Bug in raster::crop? - solved
Ok, I removed and re-installed the raster package, and now everything works. Julian M. Burgos writes:
I should add that I get this also when loading R with the --vanilla flag. Julian M. Burgos writes:
Hello everyone, I am getting this error when using the crop function in the raster package. Here is an example, sing the example in the help file:
r <- raster(nrow=45, ncol=90) r[] <- 1:ncell(r) e <- extent(-160, 10, 30, 60) rc <- crop(r, e)
Error in extent(extent) : insufficient number of elements (should be 4) I am using R version 3.4.4., and raster 2.6-7. Many thanks, Julian
-- Julian Mariano Burgos, PhD Hafranns?knastofnun, ranns?kna- og r??gjafarstofnun hafs og vatna/ Marine and Freshwater Research Institute Botnsj?varsvi?s / Demersal Division Sk?lagata 4, 121 Reykjav?k, Iceland S?mi/Telephone : +354-5752037 Br?fs?mi/Telefax: +354-5752001 Netfang/Email: julian.burgos at hafogvatn.is