Dotted case

dottedCase(object, ...)

# S4 method for character
dottedCase(object, names = TRUE, prefix = TRUE,
  smart = TRUE)

dotted(...)

Arguments

object

Object.

...

Additional arguments.

names

logical(1). Sanitize names.

prefix

logical(1). Prepend "X" character if necessary, when string begins with a syntactically invalid character, such as a number or non-alphanumeric. Note that names are always made syntactically valid when applicable with "X" prefix. See make.names() for details. Recommended by default.

smart

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

Value

Modified object, with names formatted in dotted case.

Note

dottedCase() support is provided for matching against base R parameters. However, it is recommended to avoid using it for variable assignments into an environment, as that can introduce conflicts with base functions.

Updated 2019-10-08.

Examples

data(syntactic, package = "acidtest") object <- syntactic$character dottedCase(object)
#> [1] "percent.GC" "X10um" "X5.3.bias" #> [4] "X5prime" "G2M.Score" "hello.world" #> [7] "HELLO.WORLD" "Mazda.RX4" "n.Count" #> [10] "RNAI.clones" "tx2gene" "TX2.Gene.ID" #> [13] "worfdb.HTML.Remap" "X123" NA