get.diversity: get.diversity

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/rarefaction.R

Description

Collectorscurves visualize the richness gained by picking more samples.

Usage

1
2
3
	get.diversity(obj, div = "richness", multi = FALSE)
	get.mean.diversity(obj, div = "richness")
	get.median.diversity(obj, div = "richness")

Arguments

obj

Object of type rtk

div

diversity measure as string e.g "richness"

multi

Argument set to true if called recursivly and class should not be checked. Should not be set in normal use case.

Details

This set of functions allows fast and easy access to calculated diversity measures by rtk. It returns a matrix, when rarefaction was only performed to one depth and a list of matrices or vectors if rarefaction was done for multiple depths.

Author(s)

Falk Hildebrand, Paul Saary

References

Saary, Paul, et al. "RTK: efficient rarefaction analysis of large datasets." Bioinformatics (2017): btx206.

See Also

Use rt before calling this function.

Examples

1
2
3
4
5
6
7
8
require("rtk")
# Collectors Curve dataset should be broad and contain many samples (columns)
data            <- matrix(sample(x = c(rep(0, 15000), rep(1:10, 100)),
                          size = 10000, replace = TRUE), ncol = 80)
data.r 			<- rtk(data, depth = min(colSums(data)))
get.diversity(data.r)
get.median.diversity(data.r)
get.mean.diversity(data.r)

rtk documentation built on July 1, 2020, 11:15 p.m.