ggrarecurve: Rarefaction alpha index

Description Usage Arguments Value Author(s) Examples

View source: R/plot-ggrarecurve.R

Description

Rarefaction alpha index

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
ggrarecurve(obj, ...)

## S3 method for class 'phyloseq'
ggrarecurve(obj, chunks = 400, factorLevels = NULL, ...)

## S3 method for class 'data.frame'
ggrarecurve(obj, sampleda, factorLevels, chunks = 400, ...)

## S3 method for class 'rarecurve'
ggrarecurve(
  obj,
  indexNames = "Observe",
  linesize = 0.5,
  facetnrow = 1,
  shadow = TRUE,
  factorNames,
  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)).

...

additional parameters, see also ggplot2{ggplot}.

chunks

integer, the number of subsample in a sample, default is 400.

factorLevels

list, the levels of the factors, default is NULL, if you want to order the levels of factor, you can set this.

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.

shadow

logical, whether merge samples with group (factorNames) and display the ribbon of group, default is TRUE.

factorNames

character, default is missing.

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

1
2
3
4
5
6
7
8
9
data(test_otu_data)
library(ggplot2)
prare <- ggrarecurve(test_otu_data,
               indexNames=c("Observe","Chao1","ACE"),
               shadow=FALSE,
               factorNames="group"
         ) +
         theme(legend.spacing.y=unit(0.02,"cm"),
               legend.text=element_text(size=6))

MicrobiotaProcess documentation built on April 18, 2021, 6 p.m.