Update them if they are not the latest version.

-\section{Simulating trees}

+\subsection{Simulating trees}

The simplest way to generate a random tree is with the rcoal() function:

-~~\~~section{Simulating phenotypic data on trees}

+\subsection{Simulating phenotypic data on trees}

The sim.char() function from the geiger library is a convenient tool for

simulating character evolution.

-We'll simulate two characters, each with a variance of 1 and a covariance with

-each other of 0.3. First, make a variance-covariance matrix describes this

+We'll simulate three characters, each with a variance of 1. The fist two

+characters will have a covariance of 0.7 with each other. The third characters

+will have a covariance of 0 with the other characters. First, make a

+variance-covariance matrix describes this relationship:

-vcv <- c( 1, 0.3, 0.3, 1 )

-xy <- sim.char( t, vcv, nsims = 500, model = "brownian", root.state = 1 )

+D <- sim.char( t, vcv, nsims = 500, model = "brownian", root.state = 0 )

This shows just the first simulation.

-You can plot the data right onto the tree. The phylobase library has some nice

-tools for plotting miltivariate data:

+You can plot the data right onto the tree. The adephylo library has some nice

+tools for plotting miltivariate data, but we first need to combine the tree

+and data into a phylo4d object:

-xy4d <- phylo4d( t, xy[,,1] )

-table.phylo4d( xy4d, box=FALSE )

+D4 <- phylo4d( t, D[,,1] )

+table.phylo4d( D4, box=FALSE )

\section{How this document was made}

This document is a computable data report compiled directly from the data.

To recreate this file from the data, you will need to install: