This document provides an overview of using phylogenies in comparative analysis. It discusses why phylogenies are important in comparative analysis to account for shared evolutionary history between taxa. It summarizes how re-analyzing Salisbury's data on stomatal density using independent contrasts and incorporating a phylogeny changed the conclusions. The document outlines how to obtain or generate a phylogeny and load it with trait data into R. It demonstrates using the CAPER package to conduct phylogenetic generalized least squares (pgls) to analyze traits while accounting for phylogeny, including for continuous traits and factors. It discusses visualizing and exploring phylogenies in R and other programs.