Hello. I am trying to figure out how to group samples based on metadata for rarefaction curves. I have a phyloseq object and I can get rarefaction curves for all the samples in my dataset by using:
rarecurve(t(otu_table(physeq)), step = 100, cex = 0.5, label = FALSE, xlim= c(0,20000))
However, I would like to group samples by species so that I only have 13 curves instead of several hundred. How can I do that?