R in command line is not installing any packages. Have tried changing repos but packages do not stay installed. Everything works fine in Rstudio. This is an issue for when working with mapDamage
Have changed the repository. Uninstalled and reinstalled R multiple times.
> install.packages("gam")
Installing package into ‘/home/gf/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
Warning message:
package ‘gam’ is not available (for R version 3.4.4)
Changed the repository to "http://cran.rstudio.com" and it can install but as soon as I leave the R window it reverts back to the original repository and no longer works.