mp_plot_alpha {MicrobiotaProcess} | R Documentation

## Plotting the alpha diversity between samples or groups.

### Description

Plotting the alpha diversity between samples or groups.

### Usage

    mp_plot_alpha(
      .data,
      .group,
      .alpha = c("Observe", "Shannon"),
      test = "wilcox.test",
      comparisons = NULL,
      step_increase = 0.05,
      ...
    )

    ## S4 method for signature 'MPSE'
    mp_plot_alpha(
      .data,
      .group,
      .alpha = c("Observe", "Shannon"),
      test = "wilcox.test",
      comparisons = NULL,
      step_increase = 0.05,
      ...
    )

    ## S4 method for signature 'tbl_mpse'
    mp_plot_alpha(
      .data,
      .group,
      .alpha = c("Observe", "Shannon"),
      test = "wilcox.test",
      comparisons = NULL,
      step_increase = 0.05,
      ...
    )

    ## S4 method for signature 'grouped_df_mpse'
    mp_plot_alpha(
      .data,
      .group,
      .alpha = c("Observe", "Shannon"),
      test = "wilcox.test",
      comparisons = NULL,
      step_increase = 0.05,
      ...
    )

### Arguments

`.data` | MPSE or tbl_mpse object
`.group` | the column name of sample group information
`.alpha` | the column name of alpha index after run mp_cal_alpha
`test` | the name of the statistical test, default is 'wilcox.test'
`comparisons` | A list of length-2 vectors. The entries in the vector are either the names of 2 values on the x-axis or the 2 integers that correspond to the index of the columns of interest, default is NULL, meaning it will be calculated automatically with the names in the .group.
`step_increase` | numeric vector with the increase in fraction of total height for every additional comparison to minimize overlap, default is 0.05.
`...` | additional parameters, see also `geom_signif`

### Author(s)

Shuangbin Xu

### Examples

    ## Not run:
    data(mouse.time.mpse)
    mpse <- mouse.time.mpse %>%
            mp_rrarefy() %>%
            mp_cal_alpha(.abundance=RareAbundance)
    mpse
    p <- mpse %>%
         mp_plot_alpha(.group=time, .alpha=c(Observe, Shannon, J))
    p

    ## End(Not run)

[Package MicrobiotaProcess version 1.4.4 Index]