get_rarecurve: obtain the result of rare curve

get_rarecurveR Documentation

obtain the result of rare curve

Description

generate the result of rare curve.

Usage

get_rarecurve(obj, ...)

## S4 method for signature 'data.frame'
get_rarecurve(obj, sampleda, factorLevels = NULL, chunks = 400)

## S4 method for signature 'phyloseq'
get_rarecurve(obj, ...)

Arguments

obj

phyloseq class or data.frame shape of data.frame (nrow sample * ncol feature)

...

additional parameters.

sampleda

data.frame, (nrow sample * ncol factor)

factorLevels

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

chunks

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

Details

This function is designed to calculate the rare curve result of otu table the result can be visualized by 'ggrarecurve'.

Value

rarecurve class, which can be visualized by ggrarecurve

Author(s)

Shuangbin Xu

Examples

## Not run: 
    data(test_otu_data)
    test_otu_data %<>% as.phyloseq()
    set.seed(1024)
    res <- get_rarecurve(test_otu_data, chunks=200)
    p <- ggrarecurve(obj=res, 
                     indexNames=c("Observe","Chao1","ACE"),
                     shadow=FALSE,
                     factorNames="group")

## End(Not run)

xiangpin/MicrobiotaProcess documentation built on Nov. 12, 2024, 2:05 p.m.