library(rbiom)
infile <- system.file("extdata", "hmp50.bz2", package = "rbiom")
biom <- read.biom(infile)
ad <- alpha.div(biom)
head(ad)
biom <- subset(biom, `Body Site` == "Saliva" & Age < 26)
ad <- alpha.div(biom, "multi")
boxplot(Shannon ~ Depth, data=ad, xlab="Reads", ylab="Diversity")
Run the code above in your browser using DataLab