Dotted case

dottedCase(object, ...)

# S4 method for atomic
dottedCase(object, names = TRUE)

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

# S4 method for factor
dottedCase(object, names = TRUE)

# S4 method for list
dottedCase(object, names = TRUE)

# S4 method for matrix
dottedCase(object, rownames = FALSE,
  colnames = TRUE)

# S4 method for data.frame
dottedCase(object, rownames = FALSE,
  colnames = TRUE)

# S4 method for Vector
dottedCase(object, names = TRUE, mcols = TRUE,
  metadata = TRUE)

# S4 method for DataTable
dottedCase(object, rownames = FALSE,
  colnames = TRUE, mcols = TRUE, metadata = TRUE)

# S4 method for Ranges
dottedCase(object, names = FALSE, mcols = TRUE,
  metadata = TRUE)

# S4 method for Matrix
dottedCase(object, rownames = FALSE,
  colnames = TRUE)

# S4 method for SummarizedExperiment
dottedCase(object, rownames = FALSE,
  colnames = TRUE, assayNames = TRUE, rowData = TRUE,
  colData = TRUE, metadata = TRUE)

dotted(...)

Arguments

object

Object.

names

logical(1). Sanitize names.

rownames

logical(1). Apply sanitization on row names. This is not generally recommended by default, since rownames commonly contain gene identifiers that should not be modified.

colnames

logical(1). Apply sanitization on column names. This is generally recommended by default.

mcols

logical(1). Sanitize names of metadata columns (i.e. DataFrame).

metadata

logical(1). Sanitize metadata names.

assayNames

logical(1). Sanitize assay names.

rowData

logical(1). Sanitize the row data names.

colData

logical(1). Sanitize column names of column data.

...

Additional arguments.

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.

Examples

data(syntactic, package = "acidtest") lapply(syntactic, dottedCase)
#> $character #> [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 #> #> $character_named #> Item.A Item.B #> "hello.world" "HELLO.WORLD" #> #> $factor #> sample.1 sample.2 sample.3 sample.4 #> group.1 group.1 group.2 group.2 #> Levels: group.1 group.2 #> #> $list #> $list$Item.A #> [1] 1 2 #> #> $list$Item.B #> [1] 3 4 #> #> #> $matrix #> Murder Assault Urban.Pop Rape #> Alabama 13.2 236 58 21.2 #> Alaska 10.0 263 48 44.5 #> Arizona 8.1 294 80 31.0 #> Arkansas 8.8 190 50 19.5 #> California 9.0 276 91 40.6 #> Colorado 7.9 204 78 38.7 #> #> $data.frame #> Murder Assault Urban.Pop Rape #> Alabama 13.2 236 58 21.2 #> Alaska 10.0 263 48 44.5 #> Arizona 8.1 294 80 31.0 #> Arkansas 8.8 190 50 19.5 #> California 9.0 276 91 40.6 #> Colorado 7.9 204 78 38.7 #>