문제

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