Dotted case

# S4 method for ANY
dotted(object)

# S4 method for character
dotted(object)

# S4 method for factor
dotted(object)

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

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

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

# S4 method for DataFrame
dotted(object, rownames = FALSE, colnames = TRUE)

# S4 method for GRanges
dotted(object)

# S4 method for GRangesList
dotted(object)

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 sanitization on column names. This is generally recommended by default.

Value

Modified object. Contains syntatically valid names. For objects supporting names(), the underlying data returns unchanged, except for character or vector class.

Note

dotted() 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

load(system.file("extdata", "mn.rda", package = "syntactic")) lapply(mn, dotted)
#> $character #> [1] "hello.world" "HELLO.WORLD" "RNAI.clones" #> [4] "n.Count" "tx2gene" "TX2.Gene.ID" #> [7] "G2M.Score" "worfdb.HTML.Remap" "Mazda.RX4" #> [10] "percent.GC" "X5prime" "X5.3.bias" #> [13] "X123" NA #> #> $namedCharacter #> 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 #> #> $dataFrame #> 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 #> #> $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 #> #> $tibble #> # A tibble: 6 x 11 #> manufacturer model displ year cyl trans drv cty hwy fl class #> <chr> <chr> <dbl> <int> <int> <chr> <chr> <int> <int> <chr> <chr> #> 1 audi a4 1.8 1999 4 auto(l5) f 18 29 p compa… #> 2 audi a4 1.8 1999 4 manual(m5) f 21 29 p compa… #> 3 audi a4 2 2008 4 manual(m6) f 20 31 p compa… #> 4 audi a4 2 2008 4 auto(av) f 21 30 p compa… #> 5 audi a4 2.8 1999 6 auto(l5) f 16 26 p compa… #> 6 audi a4 2.8 1999 6 manual(m5) f 18 26 p compa… #> #> $list #> $list$Item.A #> [1] 1 2 #> #> $list$Item.B #> [1] 3 4 #> #>