Advanced Research Computing
Virtual Visit Request info Apply
MENUMENU
  • About
    • Overview
    • Details
    • Terms of Service
    • FAQs
    • Our Team
    • Testimonials
  • Services
    • ARC Support Bot
    • Coffee/Office Hours
    • Data Portal »
    • Pricing
    • Secure Computing
    • Service Requests
      • Request an Account
      • Request Classroom Access
      • Request Data Science Development/Consulting
      • Request Software
      • Request Storage
  • Resources
    • Documentation »
    • Workshops
    • Web Apps
      • Doppler (NAU only)
      • Metrics (NAU only)
      • OnDemand
      • XDMod
      • XDMoD Reports
  • Research
    • Current Projects
    • Publications
  • Collaboration
    • Arizona Research Computing
    • CRN
    • External
  • IN
  • ARC
  • Rgdal Install

Installing Rgdal

What follows are instructions to install rgdal for use within R 3.6.3, and gdal 3.0.4. The following commands will need to be run on one of our login nodes wind or rain.

In order to install rgdal:

    1. Load the R, proj, and gdal modules required for rgdal.
      [abc123@wind ~]$ module load R/3.6.3 proj/6.1.0 gdal/3.0.4
    2. Export the PKG_CONFIG_PATH environment variable.
      [abc123@wind ~]$ export PKG_CONFIG_PATH=/packages/PROJ/6.1.0/lib/pkgconfig
    3. Start R.
      [abc123@wind ~]$ R
    4. Install the rgdal package.
      > install.packages(c('rgdal'),repos = "http://cran.case.edu", configure.args=c("--with-proj-include=/packages/PROJ/6.1.0/include","--with-proj-lib=/packages/PROJ/6.1.0/lib"))

Troubleshooting

If you receive the proj_create_crs_to_crs_from_pj error, then you will need to force the installer to use an older version. This can be done inside an R shell by executing the following commands:
> packageurl <- "https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.4-8.tar.gz"
> install.packages(packageurl, repos=NULL, type="source")

If you have any questions, please contact us.