Skip to contents

Sum the observations in each sample.

Usage

sample_sums(biom)

Arguments

biom

An rbiom object, such as from as_rbiom(). Any value accepted by as_rbiom() can also be given here.

Value

A named numeric vector of the number of observations in each sample. The names are the sample IDs.

See also

Other samples: pull.rbiom()

Other rarefaction: rare_corrplot(), rare_multiplot(), rare_stacked(), rarefy(), rarefy_cols()

Examples

    library(rbiom)
    
    sample_sums(hmp50) %>% sort() %>% head()
#> HMP36 HMP24 HMP03 HMP02 HMP42 HMP17 
#>   182  1183  1353  1371  1489  1579 
    
    hist(sample_sums(hmp50))