Skip to contents

Count matrix.

Usage

counts(object, ...)

counts(object, ...) <- value

# S4 method for SummarizedExperiment
counts(object)

# S4 method for SummarizedExperiment,Matrix
counts(object) <- value

# S4 method for SummarizedExperiment,matrix
counts(object) <- value

Arguments

object

Object.

value

Value to assign.

...

Additional arguments.

Value

Matrix. Typically matrix or Matrix class.

Note

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

Updated 2022-05-23.

Examples

data(RangedSummarizedExperiment, package = "AcidTest")

## SummarizedExperiment ====
object <- RangedSummarizedExperiment
x <- counts(object)
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