Skip to contents

Syntactic naming functions

Usage

camelCase(object, ...)

dottedCase(object, ...)

snakeCase(object, ...)

upperCamelCase(object, ...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# S4 method for data.frame
dottedCase(object, rownames = FALSE, colnames = 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 atomic
snakeCase(object, names = TRUE)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# S4 method for 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
#>