makeNames: Make syntactically valid names

makeNamesR Documentation

Make syntactically valid names

Description

For atomic vectors, these functions will sanitize the values. Otherwise, they will set names(), rownames(), and/or colnames() without modification of the values.

Usage

makeNames(object, ...)

## S4 method for signature 'character'
makeNames(object, unique = TRUE, smart = FALSE)

## S4 method for signature 'factor'
makeNames(object, unique = TRUE, smart = FALSE)

Arguments

object

Object.

unique

logical(1). If TRUE, the resulting elements are unique. Recommended by default, for syntactically valid names (e.g. column, row names). Note that this is disabled by default for make.names().

smart

logical(1). Handle complicated special cases, such as mixed case acronyms, plus/minus, percentages, etc.

...

Additional arguments.

Details

Sanitizes names using underscores instead of dots, the convention used by make.names().

Value

Modified object.

Note

Updated 2023-09-21.

See Also

Examples

data(syntactic, package = "AcidTest")
object <- syntactic[["character"]]
makeNames(object)

acidgenomics/syntactic documentation built on Oct. 28, 2023, 7:12 a.m.