Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R could not find function "checkAtAssignment" while running rworldmap

Tags:

r

rworldmap

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.

like image 785
user3050366 Avatar asked Sep 17 '26 12:09

user3050366


1 Answers

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

like image 128
user3050366 Avatar answered Sep 20 '26 04:09

user3050366



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!