0

I have been using a code in R to create Kernel Density contours from a serie of GPS positions, and it's always been working nicely.

However, it seems like I can not use or install the rgdal package anymore. When I try to install it, it says:

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'https://cran.rstudio.com/bin/windows/contrib/4.2/rgdal_1.6-7.zip' failed

Therefore, it seems that I can not use the sf, raster, writeRaster and readOGR functions, which I need to use in my code.

I am stuck and really need this code to work, and I could not find any solution to fix this. Any help would be highly appreciated. The whole code can be available on request.

At first there was an issue with the wrong RTools, but I fixed this. It just seems like the package does not exist anymore? Is there any replacement to it? I even downloaded an older version of RStudio that I know used to work with this package, but the problem is still the same.

Thank you so much.

  • 2
    Looking at the CRAN page for [`rgdal`](http://cran.nexr.com/web/packages/rgdal/index.html), the package has not been updated since 2017 and the last binary package released for windows (on CRAN) is for R-3.5. I suggest you try `install.packages("rgdal", type="source")` to compile it instead of looking for binaries. If that doesn't work (or you already tried that), then there are typically a lot of good indicators in warnings/errors between `install.packages` and the failed return, please [edit] your question and include all of that. Thanks, and good luck! – r2evans Aug 09 '23 at 13:23
  • 3
    See [informational message](https://stackoverflow.com/questions/76866850/unable-to-complete-analyses-with-gazepath-in-r-4-2-1), `rgdal` at end of life in Oct 23 and your analytic process needs to migrate to `sf`, `terra`, `lwgeom` etc. But at moment, @r2evans approach with 'source', should work for you. – Chris Aug 09 '23 at 13:44
  • The main CRAN mirror shows that rgdal was updated in May 2023. So it looks like some CRAN mirrors are out of date. One thing to try would be to change the CRAN mirror you are downloading from. See, e.g., this question https://stackoverflow.com/questions/8475102/set-default-cran-mirror-permanent-in-r – Richie Cotton Aug 09 '23 at 14:11

0 Answers0