Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addnames

Generating Names


Description

Generates names or dimnames for objects.

Usage

addnames(x, ...)

## Default S3 method:
addnames(x, ...)

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

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

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

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.


pkgmaker

Development Utilities for R Packages

v0.32.2
GPL (>= 2)
Authors
Renaud Gaujoux [aut, cre]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.