check-scalar-validNames: Are these valid names?

check-scalar-validNamesR Documentation

Are these valid names?

Description

Are these valid names?

Usage

validNames(x)

Arguments

x

Object.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2023-09-29.

See Also

  • make.names().

Examples

## TRUE ====
## Dots (periods) and underscores are valid.
validNames(c("sample.1", "sample_1"))

## FALSE ====
## Can't begin with a number.
validNames("293cells")
## Cannot contain duplicates.
validNames(c("a", "a"))
## Spaces, dashes (hyphens), and other non-alphanumerics aren't valid.
validNames("sample 1")
validNames("cell-AAAAAAAA")
validNames("GFP+")

acidgenomics/goalie documentation built on Dec. 11, 2023, 11:36 p.m.