View source: R/adonis-custom.R
adonisplus | R Documentation |
Permutational multivariate analysis of variance, plus
adonisplus(
data,
distmat,
formula,
sample_id_var = SampleID,
rep_meas_var = subject_id,
shuffle = NULL,
permutations = 999,
seed = 42
)
data |
Data to use in the test. |
distmat |
Distance matrix, either a matrix or an object of class
|
formula |
Model formula. The LHS (the part to the left of the tilde) must be "distmat". The formula can either be a literal formula or a string that can be converted into a formula. |
sample_id_var |
Variable in |
rep_meas_var |
Variable in |
shuffle |
Named character vector that specifies how to carry out
restricted permutations for variables in |
permutations |
Number of permutations. |
seed |
Random seed, set just before the initial call to
|
A typical experimental design has subjects in a few groups sampled
repeatedly over a few time points. If the variable denoting the group is
study_group
and the variable denoting the time point is
time_point
, then the shuffle
argument would be
c(study_group = "between", time_point = "within")
. During the
permutation stage, the values of the study group will be shuffled between
subjects, preserving the value within each subject. Conversely, the values
of the time point will be shuffled only within each subject.
The results from vegan::adonis()
in tidy format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.