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

upperCamelCase(object, ...)

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

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

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

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

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

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

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

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

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

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

Arguments

object

Object.

names

logical(1). Sanitize names.

Only applies to string mode (rename = FALSE).

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 to column names.

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

Note that lower camel case is generally recommended in R over the use of upper camel case. However, upper camel case is recommended by Bioconductor for S4 class names and corresponding generators, but not variables or functions.

Note

Updated 2019-09-25.

Examples

data(syntactic, package = "acidtest") lapply(syntactic, upperCamelCase)
#> $character #> [1] "PercentGC" "X10um" "X5X3Bias" "X5prime" #> [5] "G2MScore" "HelloWorld" "HELLOWORLD" "MazdaRX4" #> [9] "NCount" "RNAIClones" "Tx2gene" "TX2GeneID" #> [13] "WorfdbHTMLRemap" "X123" #> #> $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 #>