I've been trying to install some new packages on R, one of them being 'osmdata'. When I install it, I get this error:
Do you want to attempt to install these from sources? (Yes/no/cancel) no
installing the source package ‘reproj’
trying URL 'http://cran.rstudio.com/src/contrib/reproj_0.4.3.tar.gz'
Content type 'application/x-gzip' length 262365 bytes (256 KB)
==================================================
downloaded 256 KB
ERROR: dependency ‘proj4’ is not available for package ‘reproj’
* removing ‘/Users/~/Library/R/arm64/4.1/library/reproj’
Warning in install.packages :
installation of package ‘reproj’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/79/pm85jx25579gy6lm3jwpym8h0000gn/T/RtmphhPiJA/downloaded_packages’
> library(osmdata)
Error in library(osmdata) : there is no package called ‘osmdata’
I get the same error when trying to install some other packages as well. Tried updating everything and it didn't work. It seems like the source packages are downloaded in a different folder rather than the usual package library folder. How can I solve this?