Nothing
#' Get alpha diversity
#'
#' @param counts_table A dataframe with organism x sample
#' @param index One of inverse_simpson,gini_simpson,shannon,fisher,coverage
#' @param zeroes A boolean for whether to ignore zero values
#' @return A list of alpha diversity
#'
#' @examples
#' diversities(matrix(seq_len(12), nrow = 3),index="shannon")
#'
#' @export
diversities <- function(counts_table, index="all", zeroes=TRUE) {
# Only include accepted indices
index <- tolower(index)
accepted <- c("inverse_simpson", "gini_simpson", "shannon",
"fisher", "coverage")
# Return all indices
if (length(index) == 1 && index == "all") {
index <- accepted
}
if (!is.null(index)) {
index <- intersect(index, accepted)
}
if (!is.null(index) && length(index) == 0) {
return(NULL)
}
tab <- diversities_help(counts_table, index, zeroes)
tab
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.