rarefy_whole_rep: Rarefy Entire Sample Set

View source: R/rarecurve.R

rarefy_whole_repR Documentation

Rarefy Entire Sample Set

Description

rarefy_whole_rep() will rarefy each sample for different library sizes repeatedly in order to generate a representative set of data to be used in rarecurve() for generating rarefaction curves.

Usage

rarefy_whole_rep(
  x,
  rep = 100,
  steps = seq(from = 0.001, to = 1, by = 0.01),
  set.seed = NULL,
  mc.cores = 1L,
  intercept = TRUE
)

Arguments

x

The phyloseq object.

rep

The number of replicates to be performed. More replicates will take longer to conduct but will provide a smoother distribution for analyses.

steps

The steps in library sizes to rarefy to.

set.seed

The seed value for reproducibility.

mc.cores

From parallel::mclapply().

intercept

Create data points at (0,0).

Value

A data.frame containing the observed sequence counts for samples of varying rarefied library sizes.

Examples

library(mirlyn)
data(example)

## Not run: 
rarefy_whole_rep_ex <- rarefy_whole_rep(example, rep = 100)

## End(Not run)


escamero/mirlyn documentation built on Aug. 6, 2023, 9:30 p.m.