Description Usage Arguments Value Author(s) Examples
calculate the alpha index (Obseve,Chao1,Shannon,Simpson) of sample
with diversity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | get_alphaindex(obj, ...)
## S4 method for signature 'matrix'
get_alphaindex(obj, mindepth, sampleda, ...)
## S4 method for signature 'data.frame'
get_alphaindex(obj, ...)
## S4 method for signature 'integer'
get_alphaindex(obj, ...)
## S4 method for signature 'numeric'
get_alphaindex(obj, ...)
## S4 method for signature 'phyloseq'
get_alphaindex(obj, ...)
|
obj |
object, data.frame of (nrow sample * ncol taxonomy(feature)) or phyloseq. |
... |
additional arguments. |
mindepth |
numeric, Subsample size for rarefying community. |
sampleda |
data.frame,sample information, row sample * column factors. |
data.frame contained alpha Index.
Shuangbin Xu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(tidyverse)
otudafile <- system.file("extdata", "otu_tax_table.txt",
package="MicrobiotaProcess")
otuda <- read.table(otudafile, sep="\t",
header=TRUE, row.names=1,
check.names=FALSE, skip=1, comment.char="")
otuda <- otuda[sapply(otuda, is.numeric)] %>% t() %>%
data.frame(check.names=FALSE)
set.seed(1024)
alphatab <- get_alphaindex(otuda)
head(as.data.frame(alphatab))
data(test_otu_data)
class(test_otu_data)
set.seed(1024)
alphatab2 <- get_alphaindex(test_otu_data)
head(as.data.frame(alphatab2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.