ggrarecurve {MicrobiotaProcess} | R Documentation

## Rarefaction alpha index

### Description

Rarefaction alpha index

### Usage

    ggrarecurve(obj, ...)

    ## S3 method for class 'phyloseq'
    ggrarecurve(obj, ...)

    ## Default S3 method:
    ggrarecurve(
      obj,
      sampleda,
      indexNames = "Observe",
      linesize = 0.5,
      facetnrow = 1,
      mapping = NULL,
      chunks = 400,
      factorNames,
      factorLevels,
      se = FALSE,
      method = "lm",
      formula = y ~ log(x),
      ...
    )

### Arguments

`obj` | phyloseq, phyloseq class or data.frame shape of data.frame (nrow sample * ncol feature (factor)) or ' the data.frame for stat_smooth.
`...` | additional parameters, see also `ggplot2{ggplot}`.
`sampleda` | data.frame, (nrow sample * ncol factor)
`indexNames` | character, default is "Observe", only for "Observe", "Chao1", "ACE", "Shannon", "Simpson", "J".
`linesize` | integer, default is 0.5.
`facetnrow` | integer, the nrow of facet, default is 1.
`mapping` | set of aesthetic mapping of ggplot2, default is NULL, if the data is the data.frame for stat_smooth, the mapping should be set.
`chunks` | integer, the number of subsample in a sample, default is 400.
`factorNames` | character, default is missing.
`factorLevels` | list, the levels of the factors, default is NULL, if you want to order the levels of factor, you can set this.
`se` | logical, default is FALSE.
`method` | character, default is lm.
`formula` | formula, default is 'y ~ log(x)'

### Value

figure of rarefaction curves

### Author(s)

Shuangbin Xu

### Examples

    data(test_otu_data)
    library(ggplot2)
    prare <- ggrarecurve(test_otu_data,
                   indexNames=c("Observe","Chao1","ACE"),
                   chunks=300) +
             theme(legend.spacing.y=unit(0.02,"cm"),
                   legend.text=element_text(size=6))

[Package MicrobiotaProcess version 1.0.5 Index]