mp_adonis-methods: Permutational Multivariate Analysis of Variance Using...

mp_adonisR Documentation

Permutational Multivariate Analysis of Variance Using Distance Matrices for MPSE or tbl_mpse object

Description

Permutational Multivariate Analysis of Variance Using Distance Matrices for MPSE or tbl_mpse object

Usage

mp_adonis(
  .data,
  .abundance,
  .formula,
  distmethod = "bray",
  action = "get",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'MPSE'
mp_adonis(
  .data,
  .abundance,
  .formula,
  distmethod = "bray",
  action = "get",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'tbl_mpse'
mp_adonis(
  .data,
  .abundance,
  .formula,
  distmethod = "bray",
  action = "get",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'grouped_df_mpse'
mp_adonis(
  .data,
  .abundance,
  .formula,
  distmethod = "bray",
  action = "get",
  permutations = 999,
  seed = 123,
  ...
)

Arguments

.data

MPSE or tbl_mpse object

.abundance

the name of abundance to be calculated.

.formula

Model formula right hand side gives the continuous variables or factors, and keep left empty, such as ~ group, it is required.

distmethod

character the method to calculate pairwise distances, default is 'bray'.

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.

permutations

the number of permutations required, default is 999.

seed

a random seed to make the adonis analysis reproducible, default is 123.

...

additional parameters see also 'adonis2' of vegan.

Value

update object according action argument

Author(s)

Shuangbin Xu

Examples

data(mouse.time.mpse)
mouse.time.mpse %>%
  mp_decostand(
     .abundance=Abundance, 
     method="hellinger") %>%
  mp_adonis(.abundance=hellinger, 
            .formula=~time, 
            distmethod="bray", 
            permutations=999, # for more robust, set it to 9999. 
            action="get")

xiangpin/MicrobiotaProcess documentation built on April 14, 2024, 10:10 a.m.