Autopad zeros

autopadZeros(object, ...)

# S4 method for character
autopadZeros(object)

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

# S4 method for SummarizedExperiment
autopadZeros(object, rownames = FALSE,
  colnames = TRUE, sort = TRUE)

Arguments

object

Object.

rownames

logical(1). Apply to row names.

colnames

logical(1). Apply to column names.

sort

logical(1). Resort using sort.

...

Additional arguments.

Value

character.

Note

For methods on objects supporting dim() (e.g. matrix), the object will be returned with the rows and/or columns resorted by default. This does not apply to the character method.

Examples

data(rse, sce, package = "acidtest") ## character ==== autopadZeros(c("A1", "B10"))
#> [1] "A01" "B10"
autopadZeros(c("A1", "B10", "C100"))
#> [1] "A001" "B010" "C100"
## SummarizedExperiment ==== autopadZeros(rse, rownames = TRUE, colnames = TRUE)
#> class: RangedSummarizedExperiment #> dim: 500 12 #> metadata(3): version date interestingGroups #> assays(1): counts #> rownames(500): gene001 gene002 ... gene499 gene500 #> rowData names(5): geneID geneName geneBiotype broadClass entrezID #> colnames(12): sample01 sample02 ... sample11 sample12 #> colData names(1): condition
## SingleCellExperiment ==== autopadZeros(sce, rownames = TRUE, colnames = TRUE)
#> class: SingleCellExperiment #> dim: 500 100 #> metadata(1): date #> assays(1): counts #> rownames(500): gene001 gene002 ... gene499 gene500 #> rowData names(5): geneID geneName geneBiotype broadClass entrezID #> colnames(100): cell001 cell002 ... cell099 cell100 #> colData names(2): expLibSize sampleID #> reducedDimNames(0): #> spikeNames(0):