mp_plot_rarecurve-methods: Rarefaction alpha index with MPSE

mp_plot_rarecurveR Documentation

Rarefaction alpha index with MPSE

Description

Rarefaction alpha index with MPSE

Usage

mp_plot_rarecurve(
  .data,
  .rare,
  .alpha = c("Observe", "Chao1", "ACE"),
  .group = NULL,
  nrow = 1,
  plot.group = FALSE,
  ...
)

## S4 method for signature 'MPSE'
mp_plot_rarecurve(
  .data,
  .rare,
  .alpha = c("Observe", "Chao1", "ACE"),
  .group = NULL,
  nrow = 1,
  plot.group = FALSE,
  ...
)

## S4 method for signature 'tbl_mpse'
mp_plot_rarecurve(
  .data,
  .rare,
  .alpha = c("Observe", "Chao1", "ACE"),
  .group = NULL,
  nrow = 1,
  plot.group = FALSE,
  ...
)

## S4 method for signature 'grouped_df_mpse'
mp_plot_rarecurve(
  .data,
  .rare,
  .alpha = c("Observe", "Chao1", "ACE"),
  .group = NULL,
  nrow = 1,
  plot.group = FALSE,
  ...
)

Arguments

.data

MPSE object or tbl_mpse after it was performed mp_cal_rarecurve with action='add'

.rare

the column names of

.alpha

the names of alpha index, which should be one or more of Observe, ACE, Chao1, default is Observe.

.group

the column names of group, default is NULL, when it is provided, the rarecurve lines will group and color with the group.

nrow

integer Number of rows in facet_wrap.

plot.group

logical whether to combine the samples, default is FALSE, when it is TRUE, the samples of same group will be represented by their group.

...

additional parameters, see also geom_smooth.

Author(s)

Shuangbin Xu

Examples

## Not run: 
data(mouse.time.mpse)
mpse <- mouse.time.mpse %>%
        mp_rrarefy()
mpse
mpse %<>% mp_cal_rarecurve(.abundance=RareAbundance, chunks=100, action="add") 
mpse
p1 <- mpse %>% mp_plot_rarecurve(.rare=RareAbundanceRarecurve, .alpha="Observe")
p2 <- mpse %>% mp_plot_rarecurve(.rare=RareAbundanceRarecurve, .alpha="Observe", .group=time)
p3 <- mpse %>% mp_plot_rarecurve(.rare=RareAbundanceRarecurve, .alpha="Observe", .group=time, plot.group=TRUE)

## End(Not run)

xiangpin/MicrobiotaProcess documentation built on July 24, 2024, 11:44 p.m.