# NOT RUN {
#The parameter folder contains the location of the database
#If not specified folder=getwd()
## Different ways to introduce the tree
#From a newick string
# }
# NOT RUN {
distribution("(1,2,3,4,5);",0.5,0.3,db.path=folder)
# }
# NOT RUN {
distribution("(1,(2,(3,(4,5))));",0.5,0.3,db.path=folder)
# }
# NOT RUN {
#From a phylo object
# }
# NOT RUN {
require(ape)
# }
# NOT RUN {
random.tree = rtree(5,rooted=TRUE)
# }
# NOT RUN {
distribution(random.tree,0.5,0.3,db.path=folder)
# }
# NOT RUN {
#An example of a tree generated by the alpha-gamma model (igraph object)
# }
# NOT RUN {
a.g.tree = a.g.model(5,0.5,0.3)
# }
# NOT RUN {
distribution(a.g.tree,0.5,0.3,db.path=folder)
# }
# NOT RUN {
## Different indices data
# From our data base
# }
# NOT RUN {
distribution(a.g.tree,0.5,0.3,db.path=folder)
# }
# NOT RUN {
# From a data.frame generated by 'indices.simulation'
# ('Repetitions' set as 10 for a fast example)
# }
# NOT RUN {
indices.data = indices.simulation(5,0.5,0.3,10)
# }
# NOT RUN {
distribution(a.g.tree,0.5,0.3,set.indices=indices.data)
# }
# NOT RUN {
# Allow the function to do a new generation of data and compute their indices
# }
# NOT RUN {
distribution(a.g.tree,0.5,0.3,new.simulation=TRUE,repetitions=10)
# }
# NOT RUN {
# WARNING! it might take a long time, it depends on the parameters
# 'n' (number of leaves) and 'repetition' (number of repetitions)
# }
Run the code above in your browser using DataLab