Problem #1

  1. Read in the morphometric data from Barr, 2014 on bovid astragali.

  2. Select the following columns from the data: Taxon, B, DistRad, and Habitat. Create a new dataframe with the Taxon, the Habitat and species means for B and DistRad.

  3. Read in the ruminant phylogeny from Hernández Fernández & Vrba, 2007.

  4. Combine the data and the tree using to ready the tree for pgls. Note: if you used dplyr in the steps above, you need to change the class of the resulting dataframe, because there is a bug in caper and it won’t deal with a dplyr tbl_df object. You can use this line of code to fix it class(dataframeFromDplyr) <- "data.frame"

  5. Plot the trimmed tree that includes just the taxa of interest in the astragalus dataset. Make it as beautiful as you can.

  6. Perform PGLS to test the hypothesis that log(B) is a function of log(DistRad), while controlling for phylogenetic signal. Be sure to include the geometric mean of these measurements (square root of their product) as a covariate to control for body size. Is this hypothesis supported?

  7. Plot log(B) as a function of log(DistRad), and color code the points by habitat type.