Error: could not find function ... in R -


i using r , tried some.function got error message :

error: not find function `some.function` 

this question comes regularly. when error: not find function in r, how can solve it?

thank in advance help.

this meant faq question, please complete possible. answer community answer, feel free edit if think missing.

this question approved on meta: https://meta.stackexchange.com/questions/101892/community-wiki-with-common-error-messages-allowed

there few things should check :

  1. did write name of function correctly? names case sensitive.
  2. did install package contains function? install.packages("thepackage") (this needs done once)
  3. did attach package workspace ? require(thepackage) or library(thepackage) (this should done every time start new r session)

if you're not sure in package function situated, can few things.

  1. if you're sure installed , attached/loaded right package, type help.search("some.function") or ??some.function information box can tell in package contained.
  2. find , getanywhere can used locate functions.
  3. if have no clue package, can use findfn in sos package explained in this answer.
  4. rsitesearch("some.function") or searching rseek alternative ways find function.

Comments