alpha_diversity: alpha_diversity

View source: R/alpha_diversity.R

alpha_diversityR Documentation

alpha_diversity

Description

Calculates alpha diversity metrics from count table: Shannon's D, Simpson's index, evenness, richness. Calculations are based on Jost et al 2006 https://doi.org/10.1111/j.2006.0030-1299.14714.x

Usage

alpha_diversity(count_df)

Arguments

count_df

Count table with samples in columns, taxa in rows

Value

data frame of alpha diversity metrics for each sample

Examples

# get example data
data(asv_example)

# rownames have to be features
asv_counts <- data.frame(asv_example[2:ncol(asv_example)], row.names=asv_example$sequence)
alpha_div <- alpha_diversity(asv_counts)


OxfordCMS/OCMSutility documentation built on Feb. 27, 2025, 8:19 p.m.