Skip to contents

Syntactic naming functions

Usage

camelCase(object, ...)

dottedCase(object, ...)

snakeCase(object, ...)

upperCamelCase(object, ...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# S4 method for class 'atomic'
snakeCase(object, names = TRUE)

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

# S4 method for class 'factor'
snakeCase(object, names = TRUE)

# S4 method for class 'list'
snakeCase(object, names = TRUE)

# S4 method for class 'matrix'
snakeCase(object, rownames = FALSE, colnames = TRUE)

# S4 method for class 'DFrame'
snakeCase(
  object,
  rownames = FALSE,
  colnames = TRUE,
  mcols = TRUE,
  metadata = TRUE
)

# S4 method for class 'Matrix'
snakeCase(object, rownames = FALSE, colnames = TRUE)

# S4 method for class 'Ranges'
snakeCase(object, names = FALSE, mcols = TRUE, metadata = TRUE)

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

# S4 method for class 'Vector'
snakeCase(object, names = TRUE, mcols = TRUE, metadata = TRUE)

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

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

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

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

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

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

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

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

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

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

Arguments

object

Object.

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.

metadata

logical(1). Sanitize metadata 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.

names

logical(1). Sanitize names.

Only applies to string mode (rename = FALSE).

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.

Note

Updated 2023-04-27.

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"           
#> 
#> $character_named
#>        itemA        itemB 
#> "helloWorld" "helloWorld" 
#> 
#> $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
#> 
#> $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
#>