Home        Syllabus


Integrative Biology 200B                                                                                                                                                        Spring 2009




Lab Prep 5: Continuous Characters in R

1. Make sure that you have R working, as described in the first lab Prep.

2. Download the file anoles_continuous.nex.

3. Download this code to fix a bug read.nexus.R

3. Download the ape package in R.  
            a) Open R and pull down Packages>Install Package(s)
b) Select a reasonable mirror.
            c) Select ape, gee, nlme and lattice and hit OK

4. Make sure that it worked.
a) Pull down Packages>Load Package(s)
            b) Select ape and hit OK
c) Drag the anoles_continuous.nex file onto the R console.  It will return an error.
            d) Press the up arrow key and edit around the file name, so that the command reads Anole.tree<-read.nexus(filename).
            e) If you didn't get an error you're all good, if you did go to step 5.
            f) Type plot(Anole.tree)
g) If you see a tree, you're all good.

4. Fixing a temporary bug in read,nexus.
a) Only do this if you have just run step 4 and got an error.
            b) Select File>Open Script
c) Select read.nexus.R and hit OK.  A window with code will open.
            d) With that window up select Edit>Run all.
            e) Repeat steps 4c) to 4g).