I need your help with R not being able to run a function with rworldmap package.

When using rworldmap package in R and trying to 'joinCountryData2Map'

sPDF <- joinCountryData2Map (myframe, joinCode = "NAME", nameJoinColumn = "location", verbose = TRUE, suggestForFailedCodes = TRUE ) 

I get the following error:

Error in mapWithData@data <- cbind(mapWithData@data, dF[matchPosnsInUserData,  : 
  could not find function "checkAtAssignment"
Calls: joinCountryData2Map
Execution halted

My guess is that R needs methods package, which I could not find for my R version.

Any suggestings why I 'could not find function "checkAtAssignment"'?

My R version is 3.0.2 Patched.

有帮助吗?

解决方案

Using rworldmap package requires loading library(methods). I am writing it here because it was really not obvious.

其他提示

Dunno what "R 3.0.2 Patched" means, but yes you are correct that somehow you don't have the methods package, which is included in the standard installation package. How about reinstalling R from the binaries or source tarball at CRAN -- that should solve your problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top