View source: R/plot-ggrarecurve.R
ggrarecurve | R Documentation |
Rarefaction alpha index
ggrarecurve(obj, ...)
## S3 method for class 'phyloseq'
ggrarecurve(obj, chunks = 400, factorLevels = NULL, ...)
## S3 method for class 'data.frame'
ggrarecurve(obj, sampleda, factorLevels, chunks = 400, ...)
## S3 method for class 'rarecurve'
ggrarecurve(
obj,
indexNames = "Observe",
linesize = 0.5,
facetnrow = 1,
shadow = TRUE,
factorNames,
se = FALSE,
method = "lm",
formula = y ~ log(x),
...
)
obj |
phyloseq, phyloseq class or data.frame shape of data.frame (nrow sample * ncol feature ( + factor)). |
... |
additional parameters,
see also |
chunks |
integer, the number of subsample in a sample, default is 400. |
factorLevels |
list, the levels of the factors, default is NULL, if you want to order the levels of factor, you can set this. |
sampleda |
data.frame, (nrow sample * ncol factor) |
indexNames |
character, default is "Observe", only for "Observe", "Chao1", "ACE". |
linesize |
integer, default is 0.5. |
facetnrow |
integer, the nrow of facet, default is 1. |
shadow |
logical, whether merge samples with group (factorNames) and display the ribbon of group, default is TRUE. |
factorNames |
character, default is missing. |
se |
logical, default is FALSE. |
method |
character, default is lm. |
formula |
formula, default is 'y ~ log(x)' |
figure of rarefaction curves
Shuangbin Xu
## Not run:
data(test_otu_data)
test_otu_data %<>% as.phyloseq()
library(ggplot2)
prare <- ggrarecurve(test_otu_data,
indexNames=c("Observe","Chao1","ACE"),
shadow=FALSE,
factorNames="group"
) +
theme(legend.spacing.y=unit(0.02,"cm"),
legend.text=element_text(size=6))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.