On Sep 6, 2017, at 2:52 PM, john polo <jpolo at mail.usf.edu> wrote:
Dear useRs,
I am trying to import a raster with the line:
nlcd <- raster("/home/jpolo/NRI/nlcd_nri5000.tif")
And I keep getting an error like this:
"Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'rgdal'
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
Calls: raster -> raster -> .local -> .rasterObjectFromFile
Execution halted"
This is the session info:
"R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.3 (Final)
locale:
[1] C
attached base packages:
[1] methods stats graphics grDevices utils datasets base
other attached packages:
[1] raster_2.5-8 sp_1.2-4 rgeos_0.3-23
loaded via a namespace (and not attached):
[1] Rcpp_0.12.10 grid_3.2.5 lattice_0.20-35 "
I know the R version is old, but this is a system that I can not update, I have no control over it. Because the version of R is old, the admin told me that they cannot install rgdal. I am not using library(rgdal) and none of the other libraries that are loaded require rgdal. The package raster does suggest it though. Is that causing the problem? Is there a way to avoid this? Any help is welcome.
best,
John
--
"Ask a man to be quiet,
and he'll be silent for a moment.
Feed a man to a red dragon
and he'll be silent for a lifetime."
-Anne Isabella Thackeray Ritchie