ungulates | R Documentation |
This data set describes the phylogeny of 18 ungulates as reported by Pelabon et al. (1995). It also gives 4 traits corresponding to these 18 species.
fission
is a list containing the 2 following objects :
is a character string giving the phylogenetic tree in Newick format.
is a data frame with 18 species and 4 traits
Variables of ungulates$tab
are the following ones :
- afbw: is a numeric vector that describes the adult female body weight (g)
- mnw: is a numeric vector that describes the male neonatal weight (g)
- fnw: is a numeric vector that describes the female neonatal weight (g)
- ls: is a numeric vector that describes the litter size
This dataset replaces the former version in ade4.
Data were obtained from Pelabon, C., Gaillard, J.M., Loison, A. and Portier, A. (1995) Is sex-biased maternal care limited by total maternal expenditure in polygynous ungulates? Behavioral Ecology and Sociobiology, 37, 311–319.
if(require(ape) && require(phylobase)){
## load data
data(ungulates)
tre <- read.tree(text=ungulates$tre)
plot(tre)
## look at two traits
afbw <- log(ungulates$tab[,1])
neonatw <- log((ungulates$tab[,2]+ungulates$tab[,3])/2)
names(afbw) <- tre$tip.label
names(neonatw) <- tre$tip.label
plot(afbw, neonatw) # relationship between traits
lm1 <- lm(neonatw~afbw)
abline(lm1)
x <- phylo4d(tre, cbind.data.frame(afbw, neonatw)) # traits on the phylogeny
## test phylogenetic inertia in residuals
orthogram(residuals(lm1), x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.