Search code examples
rraster

Raster package error


I am using the package raster, but get an error with the arguments when trying to use the function getData(). I am using examples directly from the documentation. For example:

require(raster)
getData("GADM", country = 'FRA', level =1)
Error in getData("GADM", country = "FRA", level = 1) : 
  unused arguments (country = "FRA", level = 1)
getData('ISO3')
Error in UseMethod("getData") : 
  no applicable method for 'getData' applied to an object of class "character"

Has anyone encountered this issue?


Solution

  • There is also a function called GetData in the nlme package. If you use that version of GetData, you will get this error message. Instead, please try

    raster::getData('GADM', country='FRA', level=1)