reference: https://stackoverflow.com/a/52112850/10214604
$apt install r-base
$vim 1.r
r = getOption("repos")
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
install.packages("remotes")
$Rscript 1.r
reference: https://stackoverflow.com/a/52112850/10214604
$apt install r-base
$vim 1.r
r = getOption("repos")
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
install.packages("remotes")
$Rscript 1.r
https://linuxize.com/post/how-to-install-r-on-ubuntu-18-04/