library("TreeTools", quietly = TRUE) # for as.phylo
# jackTrees will usually be generated with Jackknife() or Resample(),
# but for simplicity:
jackTrees <- as.phylo(1:100, 8)
tree <- as.phylo(0, 8)
JackLabels(tree, jackTrees)
tree$node.label <- JackLabels(tree, jackTrees, plot = FALSE)
# Write the labelled tree to screen
ape::write.tree(tree)
# Write labelled trees to a nexus file:
# write.nexus(tree, file = filename)
Run the code above in your browser using DataLab