mp_cal_rda | R Documentation |
[Partial] [Constrained] Redundancy Analysis with MPSE or tbl_mpse object
mp_cal_rda(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'MPSE'
mp_cal_rda(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'tbl_mpse'
mp_cal_rda(.data, .abundance, .formula = NULL, .dim = 3, action = "add", ...)
## S4 method for signature 'grouped_df_mpse'
mp_cal_rda(.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 rda result to the object, "only" return a non-redundant tibble with the rda result. "get" return 'rda' object can be analyzed using the related vegan funtion. |
... |
additional parameters see also 'rda' 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_rda(.abundance=Abundance,
.formula=~Al + P*(K + Baresoil),
.dim = 3,
action="add") %>%
mp_plot_ord(show.sample=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.