Skip to contents

Integer counts

Usage

integerCounts(object, ...)

# S4 method for Matrix
integerCounts(object)

# S4 method for SummarizedExperiment
integerCounts(object, assay = "counts")

# S4 method for matrix
integerCounts(object)

Arguments

object

Object.

assay

vector(1). Assay name or index position.

...

Additional arguments.

Value

Matrix. Typically matrix or Matrix class.

Note

Updated 2021-09-11.

For a SummarizedExperiment object, "counts" must be explicitly defined in assayNames.

Examples

data(RangedSummarizedExperiment, package = "AcidTest")

## SummarizedExperiment ====
object <- RangedSummarizedExperiment
x <- integerCounts(object)
class(x)
#> [1] "matrix" "array" 
is.integer(x)
#> [1] TRUE
summary(x)
#>     sample01         sample02        sample03         sample04     
#>  Min.   :  0.00   Min.   :  0.0   Min.   :  0.00   Min.   :  0.00  
#>  1st Qu.:  5.00   1st Qu.:  5.0   1st Qu.:  5.00   1st Qu.:  5.00  
#>  Median : 17.00   Median : 16.0   Median : 15.00   Median : 17.00  
#>  Mean   : 39.34   Mean   : 39.3   Mean   : 39.13   Mean   : 40.01  
#>  3rd Qu.: 41.00   3rd Qu.: 39.0   3rd Qu.: 44.25   3rd Qu.: 43.25  
#>  Max.   :686.00   Max.   :679.0   Max.   :816.00   Max.   :788.00  
#>     sample05         sample06         sample07         sample08     
#>  Min.   :  0.00   Min.   :  0.00   Min.   :  0.00   Min.   :  0.00  
#>  1st Qu.:  5.00   1st Qu.:  5.00   1st Qu.:  4.00   1st Qu.:  4.00  
#>  Median : 17.50   Median : 18.00   Median : 18.50   Median : 16.00  
#>  Mean   : 40.07   Mean   : 40.23   Mean   : 49.63   Mean   : 48.50  
#>  3rd Qu.: 43.00   3rd Qu.: 41.00   3rd Qu.: 44.00   3rd Qu.: 46.25  
#>  Max.   :687.00   Max.   :600.00   Max.   :899.00   Max.   :858.00  
#>     sample09         sample10          sample11         sample12      
#>  Min.   :  0.00   Min.   :   0.00   Min.   :  0.00   Min.   :   0.00  
#>  1st Qu.:  4.00   1st Qu.:   5.00   1st Qu.:  4.00   1st Qu.:   4.00  
#>  Median : 17.00   Median :  17.00   Median : 15.00   Median :  17.00  
#>  Mean   : 47.93   Mean   :  49.83   Mean   : 48.15   Mean   :  49.25  
#>  3rd Qu.: 51.00   3rd Qu.:  48.00   3rd Qu.: 46.50   3rd Qu.:  47.00  
#>  Max.   :929.00   Max.   :1251.00   Max.   :861.00   Max.   :1148.00