View source: R/phyloseq_mult_dist.R
mult_dist_average | R Documentation |
This function can be used in order to avergage beta diversity over multiple rarefaction iterations.
mult_dist_average(dlist)
dlist |
List of distance matrices (class 'dist' or 'matrix') |
Distance matrix of the same class as input matrices ('dist' or 'matrix') with averaged values.
library(plyr)
# Generate dummy data (list with 3 5x5 matrices)
ddd <- rlply(.n = 3, .expr = function(){ as.dist( matrix(sample(1:1000, size = 25, replace = T), ncol = 5)) })
ddd
# Average matrices
mult_dist_average(ddd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.