Pergunta

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.

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top