autonames: Automatically generate names for vectors

View source: R/autonames.R

autonamesR 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)

crossmap documentation built on Jan. 13, 2023, 1:13 a.m.