mp_mrpp-methods: Analysis of Multi Response Permutation Procedure (MRPP) with...

mp_mrppR Documentation

Analysis of Multi Response Permutation Procedure (MRPP) with MPSE or tbl_mpse object

Description

Analysis of Multi Response Permutation Procedure (MRPP) with MPSE or tbl_mpse object

Usage

mp_mrpp(
  .data,
  .abundance,
  .group,
  distmethod = "bray",
  action = "add",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'MPSE'
mp_mrpp(
  .data,
  .abundance,
  .group,
  distmethod = "bray",
  action = "add",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'tbl_mpse'
mp_mrpp(
  .data,
  .abundance,
  .group,
  distmethod = "bray",
  action = "add",
  permutations = 999,
  seed = 123,
  ...
)

## S4 method for signature 'grouped_df_mpse'
mp_mrpp(
  .data,
  .abundance,
  .group,
  distmethod = "bray",
  action = "add",
  permutations = 999,
  seed = 123,
  ...
)

Arguments

.data

MPSE or tbl_mpse object

.abundance

the name of abundance to be calculated.

.group

The name of the column of the sample group information.

distmethod

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

action

character "add" joins the ANOSIM result to internal attribute of the object, "only" return a tibble contained the statistic information of MRPP analysis, and "get" return 'mrpp' 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 MRPP analysis reproducible, default is 123.

...

additional parameters see also 'mrpp' of vegan.

Value

update object according action argument

Author(s)

Shuangbin

Examples

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

xiangpin/MicrobitaProcess documentation built on April 12, 2024, 9:03 p.m.