# NOT RUN {
### To access the tutorial document for this package, type in R (not run here):
# vignette('SigTree')
### Create tree, then data frame, then use plotSigTree to plot the tree
### Code for random tree and data frame
node.size <- 10
seed <- 109
# Create tree
set.seed(seed);
library(ape)
r.tree <- rtree(node.size)
# Create p-values data frame
set.seed(seed)
r.pval <- rbeta(node.size, .1, .1)
# Randomize the order of the tip labels
# (just to emphasize that labels need not be sorted)
set.seed(seed)
r.tip.label <- sample(r.tree$tip.label, size=length(r.tree$tip.label))
r.pvalues <- data.frame(label=r.tip.label, pval=r.pval)
# Check for dependence among p-values; lack of significance here
# indicates default test="Stouffer" would be appropriate in other
# main SigTree package functions (plotSigTree, export.figtree,
# and export.inherit); otherwise, test="Hartung" would be more
# appropriate.
adonis.tree(r.tree,r.pvalues)
# }
Run the code above in your browser using DataLab