Learn R Programming

phylodyn (version 0.9.0)

generate_newick: Returns a phylo object from the argumentes generated with coalsim

Description

Returns a phylo object from the argumentes generated with coalsim

Usage

generate_newick(args)

Arguments

args
is a list containing vectors of coalescent times coal_times, sampling times samp_times, and number sampled per sampling time n_sampled, etc. This list is the output of coalsim

Value

A list with two elements newikck contains the tree in phylo format, lables a vector with tip labels

Examples

Run this code
constant<-function(x){return (rep(1,length(x)))}
simulation1<-coalsim(0,10,constant)
tree1<-generate_newick(simulation1)
plot(tree1$newick)

Run the code above in your browser using DataLab