I have installed the sf package into R but i get errors upon trying to read shapefiles using sf_read() function of which i don’t know what could be the problem.
i ran the code;
install.packages(“sf”, type = “source”, configure.args = “–with-proj-lib=$(brew –prefix)/lib/”)
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
trying URL ‘https://cran.rstudio.com/src/contrib/sf_1.0-16.tar.gz’
Content type ‘application/x-gzip’ length 3493756 bytes (3.3 MB)
downloaded 3.3 MB
- installing source package ‘sf’ …
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
WARNING: this package has a configure script
It probably needs manual configuration
** libs
Error in system(paste(MAKE, p1(paste(“-f”, shQuote(makefiles))), “compilers”), :
‘make’ not found
- removing ‘C:/Users/kmotsatsing/AppData/Local/Programs/R/R-4.3.3/library/sf’
- restoring previous ‘C:/Users/kmotsatsing/AppData/Local/Programs/R/R-4.3.3/library/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
The downloaded source packages are in
‘C:UserskmotsatsingAppDataLocalTempRtmpgxbx9Ydownloaded_packages’
library(sf)
Error: package or namespace load failed for ‘sf’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘proxy’
sf::st_read(“polbndl_bwa.shp”)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘proxy’