I just re-visited an old r script to double check my analyses. I'm getting this new error when I try to run PGLS:
No covariate specified, species will be taken as ordered in the data frame. To avoid this message, specify a covariate containing the species names with the 'form' argument.
I wonder if it has to do with a new update? I don't think there's anything wrong with my script because I also got this error when I tried to replicate previous tutorials. But just in case I'm wrong, I've pasted my script below:
gls(Diet_PC1~Habitat_PC1,correlation = corBrownian(phy = PrimateTree.phy), data=traits, method="ML")
Does anyone have any solutions?
Thanks! MD
I ran into similar issues while running through a tutorial a while back. From what I figured out, it's related to an update to 'ape' that was pushed in June. the cor[MODEL] functions now require a formula specifying the taxa covariate. Per the reference manual:
Code example from the manual:
At the time, I wasn't able to figure out how to use the "form" parameter with the tutorial I was using and get the expected results. So, I installed the prior version of "ape" released and everything ran perfectly fine (obtained the expected results for the tutorial). I'm sure this is a really useful paramter, but I wasn't able to find any good resources on how to correctly use it at the time.