I'm running an old version of R and Rstudio (3.3.3) due to my mac laptop being from 2009 and not able to run anything above 10.9.5. I've tried installing both devtools and ggplot2 packages, but I get the following error messages: When first trying to run the command install.packages("devtools"), I get the message:
Do you want to install from sources the packages which need compilation? y/n: Packages which are only available in source form, and may need compilation of C/C++/Fortran: 'fs' 'promises' 'pkgload' Do you want to attempt to install these from sources? y/n:
I answered yes to both, then the program downloaded a long range of files and then came up with the following warning message:
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
Followed by these error messages:
2 errors generated.
make: *** [api.o] Error 1
ERROR: compilation failed for package 'Rcpp'
* removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp'
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
ERROR: lazy loading failed for package 'desc'
* removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/desc'
And then a long list of further errors telling that various dependencies (Rcpp, desc, htmltools and others) were not available for different packages (fs, htmltools, xml2, pkgbuild and htmlwidgets, respectively).
At the end of the long list of warnings, I get the following message:
The downloaded source packages are in
'/private/var/folders/vy/sfrk0t6903x30258lsg7m1880000gn/T/RtmpLAHQDK/downloaded_packages'
Trying to load the package devtools, using the command library(devtools), I get the following error message:
Error in library(devtools) : there is no package called 'devtools'
I have tried updating for a more recent version of R, but it doesn't work on my OS. I've tried browsing both Stack Overflow and other fora for similar issues, but haven't found any solutions that works for this issue R 3.3.3 on Mac. Also, I'm very new to R (started yesterday!), so a lot of the explanations I've found for other versions are simply incomprehensible to me. If anyone has an idea for a solution and would be able to explain it in pedagogic manner to me, I would be most grateful. Thank you very much in advance.