if (interactive()) { # Only run in terminal
library("TreeTools", quietly = TRUE)
nCores <- ceiling(parallel::detectCores() / 2)
StartParallel(nCores) # Takes a few seconds to set up processes
GetParallel()
ClusteringInfoDistance(as.phylo(0:6, 100))
StopParallel() # Returns system resources
}
Run the code above in your browser using DataLab