[R] rgdal error when trying to import raster
Ben Tupper
btupper at bigelow.org
Thu Sep 7 00:29:41 CEST 2017
Hi,
The message "there is no package called 'rgdal'" means that you don't have rgdal installed.
https://cran.r-project.org/web/packages/rgdal/index.html
Also, you will get very good patial-centric help if you subscribed to r-sig-geo here
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Cheers,
Ben
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org
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
mailing list