View source: R/Alpha_diversity_calculator.R
Alpha_diversity_calculator | R Documentation |
Calculate alpha diversity for each sample
Alpha_diversity_calculator(taxobj, taxlevel, prefix = "")
taxobj |
Configured tax summary objects.See in |
taxlevel |
taxonomy levels used for visualization.Must be one of c("Domain","Phylum","Class","Order","Family","Genus","Species","Base"). |
prefix |
A character string as prefix of diversity index. Default:"" |
'Alpha_diversity_calculator' returns alpha-diversity of each sample in format of column table (dataframe) combined with group information in meta file.
###data preparation####
data("Two_group")
require(ggplot2)
###analysis####
Alpha_results<- Alpha_diversity_calculator(taxobj = Two_group,taxlevel = "Base")
#Check data frame contained alpha diversity
head(Alpha_results$alphaframe,5)
#Check contained statistics and plot list
names(Alpha_results$plotlist)
#Check statistics for Shannon
Alpha_results$plotlist$Plotobj_Shannon$Statistics
#Extract plot for Shannon
Alpha_results$plotlist$Plotobj_Shannon$Barplot
Alpha_results$plotlist$Plotobj_Shannon$Boxplot
Alpha_results$plotlist$Plotobj_Shannon$Violinplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.