I am using the "ape" package to run a phylogenetic gls, but I am stumped by an error message: could not find function "gls". Does anyone please know how to resolve this? Thank you.
tree <- tree.primates
bm.prim <- corBrownian(phy=tree)
XY <- data.frame(Y, X)
summary(gls(Y ~ X, correlation=corBrownian(phy=tree), data=XY))