autonames {crossmap}R Documentation

Automatically generate names for vectors

Description

Automatically generate names for vectors

Usage

autonames(x, ..., trimws = TRUE)

Arguments

x

A vector

...

Additional arguments passed to format()

trimws

Whether to trim whitespace surrounding automatically formatted names. Defaults to TRUE.

Value

Returns the names of a named vector and the elements of an unnamed vector formatted as characters.

Examples

autonames(c(a = "apple", b = "banana", c = "cantaloupe"))
autonames(c("apple", "banana", "cantaloupe"))

autonames(10^(1:4))
autonames(10^(1:4), big.mark = ",")
autonames(10^(1:4), scientific = TRUE)

[Package crossmap version 0.4.0 Index]