Learn R Programming

pkgmaker (version 0.32.10)

addnames: Generating Names

Description

Generates names or dimnames for objects.

Usage

addnames(x, ...)

# S3 method for default addnames(x, ...)

# S3 method for vector addnames(x, prefix = "x", sep = "", ...)

# S3 method for array addnames(x, prefix = letters[1:length(dim(x))], sep = "", ...)

# S3 method for matrix addnames(x, prefix = c("row", "col"), ...)

Value

the input object updated with names.

Arguments

x

object whose names are generated.

...

extra arguments to allow extension and passed to the next method.

prefix

prefix string to use. A vector can be used to specify a prefix for each dimension of x. Names are build as <prefix><sep><index>.

sep

separator used between the prefix and the numeric index.