简体   繁体   中英

Why can R not find function “getStates”

I am trying to create a character map and was recommended to use Phylotools and Ape packages in R.

I have installed the packages but when I try to do function getStates it comes up with an error message:

x<-getStates(nexdata,"tips")
Error in getStates(nexdata, "tips") : could not find function "getStates"

I have installed the right packages (so I think) and I am quite stuck. Any help would be really appreciated. If you need me to explain anything in more detail let me know.

The function library() loads and attaches add-on packages. You are using phytools and ape , so you should have in your code

library(phytools)
library(ape)

You can read more in the documentation, eg at rdocumentation.org/packages/base/versions/3.6.1/topics/library .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM