# NOT RUN {
set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion")
tree <- PCMTree(ape::rtree(8))
PCMTreeSetLabels(tree, paste0("x", PCMTreeGetLabels(tree)))
PCMTreeGetPartition(tree)
PCMTreeGetPartNames(tree)
PCMTreeGetPartRegimes(tree)
# }
# NOT RUN {
PCMTreePlot(tree) + ggtree::geom_nodelab() + ggtree::geom_tiplab()
# }
# NOT RUN {
tree <- PCMTreeSetPartition(tree, c(12, 14), inplace = FALSE)
PCMTreeGetPartition(tree)
PCMTreeGetPartNames(tree)
PCMTreeGetPartRegimes(tree)
# }
# NOT RUN {
PCMTreePlot(tree) + ggtree::geom_nodelab() + ggtree::geom_tiplab()
# }
# NOT RUN {
# reset the partition to a default one, where there is only one part:
PCMTreeSetPartition(tree)
PCMTreeGetPartition(tree)
PCMTreeGetPartNames(tree)
PCMTreeGetPartRegimes(tree)
# }
# NOT RUN {
PCMTreePlot(tree) + ggtree::geom_nodelab() + ggtree::geom_tiplab()
# }
# NOT RUN {
# reset the labels to the default labels which are character representations
# of the node ids
PCMTreeSetLabels(tree)
PCMTreeGetPartition(tree)
PCMTreeGetPartNames(tree)
PCMTreeGetPartRegimes(tree)
# }
Run the code above in your browser using DataCamp Workspace