Reputation: 1
I already looked at the forum in Github and I did what they mentioned but still is not working. I updated the version of the library (rgdal) and library (raster) and my lON and LAT don't have decimals.
I update all the packages, the marmap packages I installed form CRAN and GibHub neither seem to work
ETPBathy <- getNOAA.bathy(lon1 = -98, lon2 = -79, lat1 = 7, lat2 = -6, resolution = 1)
ETPBathy <- getNOAA.bathy(lon1 = -98, lon2 = -79, lat1 = 7, lat2 = -6, resolution = 1) Querying NOAA database ... This may take seconds to minutes, depending on grid size Error in if (ncol(x) == 3 & !exists("bathy", inherits = FALSE)) { : argument is of length zero
Still not working, maybe the R version? Does anyone know what to do in this case?
Upvotes: 0
Views: 86
Reputation: 1234
marmap v1.0.9
is now available on GitHub:
remotes::install_github("ericpante/marmap")
This version should solve the infamous Error message encountered by some (most ?) Windows users:
Error in if (ncol(x) == 3 & !exists("bathy", inherits = FALSE)) { :
argument is of length zero
I have been able to confirm that the error was due to a limitation in the length of urls that the raster
package can handle on Windows. The geotif files from NOAA's servers are now downloaded with utils::download.file()
in a temporary file on the user's disk and then imported in R using raster::raster()
.
marmap v1.0.9
will be available on CRAN servers in the next few days.
Upvotes: 0