I have been trying a lot of different ways to install this package such as:
- using dependencies argument
- installing from binary zip file
But I keep getting the following error:
* installing *source* package ‘gam’ ...
** package ‘gam’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fPIC -Wall -g -O2 -c backfit.f -o backfit.o
make: gfortran: No such file or directory
make: *** [backfit.o] Error 1
ERROR: compilation failed for package ‘gam’
* removing ‘/Users/username/Library/R/3.6/library/gam’
* restoring previous ‘/Users/username/Library/R/3.6/library/gam’
Warning in install.packages :
installation of package ‘gam’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/78/90s7m_qn425994767scnt9nh0000gn/T/RtmpvWmhBQ/downloaded_packages’