DistBoxplot | R Documentation |
DistBoxplot
DistBoxplot( dm, group, dm_name = "Dist", group_name = "", IndividualID = NULL, outdir = "" )
dm |
A squared distance matrix or a 'dist' object. |
group |
A factor indicates a metadata variable corresponds to samples in the distance matrix. |
dm_name |
An optional character string for the distance name. |
group_name |
An optional character string for the metadata variable name. |
IndividualID |
Another metadata variable that can make this function return only paired distance values within this group. |
outdir |
The output directory. |
Shi Huang
set.seed(123) x <- data.frame(rbind(t(rmultinom(7, 75, c(.201,.5,.02,.18,.099))), t(rmultinom(8, 75, c(.201,.4,.12,.18,.099))), t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))), t(rmultinom(15, 75, c(.091,.2,.32,.18,.209))), t(rmultinom(15, 75, c(.001,.1,.42,.18,.299))))) x0 <- data.frame(rbind(t(rmultinom(7, 75, c(.011,.3,.22,.18,.289))), t(rmultinom(8, 75, c(.011,.3,.22,.18,.289))), t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))), t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))), t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))))) y<-factor(c(rep("A", 30), rep("B", 30))) y0<-factor(c(rep("A", 5), rep("B", 55))) require(vegan) dm<-vegdist(x, method="bray") dm<-data.matrix(dm) DistBoxplot(dm, y, dm_name="bray")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.