I upgrade to R version 4.1.2 but now I cannot install sf
package because the package it not available for this version of R supposedly
I downloaded the file from 'https://cran.rstudio.com/bin/macosx/contrib/4.1/sf_1.0-4.tgz' and try to install from a local file because when I tried to use install.packages("sf")
the download timeout
Please could somebody provide some ideas of what I am doing wrong?
CodePudding user response:
Try
install.packages(file.choose(), repos = NULL)
This will both (1) tell R that you are installing from a local file; (2) allow you to choose the file interactively, making sure that you're not making a mistake with the name or the extension.
I don't think you'll need type = "source"
in this case, but it wouldn't hurt.
If you do need to install from source, be prepared for the fact that sf
needs several external, system libraries:
SystemRequirements: C 11, GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>= 4.8.0), sqlite3
It might be worth trying the installation from the repository again (possibly after setting options(timeout = 600)
as suggested by @jared_mamrot) — it might be a transient problem — since that will skip any headaches with installing system libraries.