autopadZeros: Autopad zeros

Description Usage Arguments Value SummarizedExperiment sample names Note Examples

Description

Autopad zeros

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
autopadZeros(object, ...)

## S4 method for signature 'character'
autopadZeros(object)

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

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

SummarizedExperiment sample names

If sampleName column is defined in colData(), these values will also get padded, if necessary. This improves # downstream handling in functions that rely on this feature.

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.

Updated 2019-09-05.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(
    RangedSummarizedExperiment,
    SingleCellExperiment,
    package = "acidtest"
)

## character ====
## Left side.
autopadZeros(c("1-EV-DMSO", "10-EV-DMSO", "2-EV-DMSO-B"))
## Right side.
autopadZeros(c("A1", "B10", "C100"))

## SummarizedExperiment ====
object <- RangedSummarizedExperiment
autopadZeros(object, rownames = TRUE, colnames = TRUE)

## SingleCellExperiment ====
object <- SingleCellExperiment
autopadZeros(object, rownames = TRUE, colnames = TRUE)

acidgenomics/basejump documentation built on March 22, 2020, 4:24 a.m.