[R] rgdal error when trying to import raster
btupper at bigelow.org
Thu Sep 7 00:29:41 CEST 2017
The message "there is no package called 'rgdal'" means that you don't have rgdal installed.
Also, you will get very good patial-centric help if you subscribed to r-sig-geo here
> 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)
>  C
> attached base packages:
>  methods stats graphics grDevices utils datasets base
> other attached packages:
>  raster_2.5-8 sp_1.2-4 rgeos_0.3-23
> loaded via a namespace (and not attached):
>  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.
> "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
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
Ecocast Reports: http://seascapemodeling.org/ecocast.html
Tick Reports: https://report.bigelow.org/tick/
Jellyfish Reports: https://jellyfish.bigelow.org/jellyfish/
More information about the R-help