mp_cal_cca | R Documentation |
[Partial] [Constrained] Correspondence Analysis with MPSE or tbl_mpse object
mp_cal_cca(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'MPSE'
mp_cal_cca(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'tbl_mpse'
mp_cal_cca(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'grouped_df_mpse'
mp_cal_cca(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
.data |
MPSE or tbl_mpse object |
.abundance |
the name of abundance to be calculated. |
.formula |
Model formula right hand side gives the constraining variables, and conditioning variables can be given within a special function 'Condition' and keep left empty, such as ~ A + B or ~ A + Condition(B), default is NULL. |
.dim |
integer The number of dimensions to be returned, default is 3. |
action |
character "add" joins the cca result to the object, "only" return a non-redundant tibble with the cca result. "get" return 'cca' object can be analyzed using the related vegan funtion. |
... |
additional parameters see also 'cca' of vegan. |
update object according action argument
Shuangbin Xu
library(vegan)
data(varespec, varechem)
mpse <- MPSE(assays=list(Abundance=t(varespec)), colData=varechem)
mpse
mpse %<>%
mp_cal_cca(.abundance=Abundance,
.formula=~Al + P*(K + Baresoil),
action="add")
mpse
mpse %>% mp_plot_ord(.ord=CCA, .group=Al, .size=K, show.sample=FALSE, bg.colour="black", colour="white")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.