Format character strings to use (lower) camel-style formatting, where word boundaries are defined by capitlization only (e.g. thisIsCamelCase).

camelCase(object, ...)

# S4 method for atomic
camelCase(object, names = TRUE, strict = FALSE)

# S4 method for character
camelCase(object, names = TRUE, strict = FALSE)

# S4 method for factor
camelCase(object, names = TRUE, strict = FALSE)

# S4 method for list
camelCase(object, names = TRUE, strict = FALSE)

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

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

# S4 method for Vector
camelCase(object, names = TRUE, mcols = TRUE,
  metadata = TRUE, strict = FALSE)

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

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

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

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

camel(...)

Arguments

object

Object.

names

logical(1). Sanitize names.

strict

logical(1). Enforce strict name sanitization. When TRUE, this does not allow the return of any capitalized acronyms. "RNA" will become "Rna", for example.

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. Contains syntatically valid names. For objects supporting names(), the underlying data returns unchanged, except for character or vector class.

Details

Camel case is recommended by Bioconductor for variable and function names.

Examples

data(syntactic, package = "acidtest") lapply(syntactic, camelCase)
#> $character #> [1] "percentGC" "x10um" "x5x3Bias" "x5prime" #> [5] "g2mScore" "helloWorld" "helloWORLD" "mazdaRX4" #> [9] "nCount" "rnaiClones" "tx2gene" "tx2GeneID" #> [13] "worfdbHTMLRemap" "x123" NA #> #> $character_named #> itemA itemB #> "helloWorld" "helloWORLD" #> #> $factor #> sample1 sample2 sample3 sample4 #> group1 group1 group2 group2 #> Levels: group1 group2 #> #> $list #> $list$itemA #> [1] 1 2 #> #> $list$itemB #> [1] 3 4 #> #> #> $matrix #> murder assault urbanPop 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 urbanPop 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 #>