This document covers installing packages on RStudio server (Ubuntu).
Currently using:
Release 16.04.5 LTS (Xenial Xerus) 64-bit
Kernel Linux 4.4.0-134-generic x86_64
MATE 1.12.1
And
RStudio Version 1.1.456
Mozilla/5.0
Follow the directions on this post.
These get run in the terminal (password required):
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev
sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libfreetype6-dev
- Add R repository First, we’ve got to add a line to our
/etc/apt/sources.list
file. This can be accomplished with the following. Note the “xenial” in the line, indicating Ubuntu 16.04. If you have a different version, just change that.
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list
This returned the following:
deb http://cran.rstudio.com/bin/linux/ubuntu xenial/
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
I did not do the following steps:
Install R-Base Most Linux users should be familiar with the old…
sudo apt-get update
sudo apt-get install r-base r-base-dev
Run the following code, need ~ 10 min to install all these packages.
This gets run in the RStudio source file.
# options for loading form CRAN
options("repos" = c(CRAN = "http://cran.rstudio.com/"))
# packages to install
install.packages(c("fs",
"mdsr",
"data.table",
"knitr",
"RCurl",
"XML",
"ggmap",
"raster",
"openair",
"rasterVis",
"viridisLite",
"sf",
"geomnet",
"ggrepel",
"showtext",
"geosphere",
"kableExtra",
"ggsn",
"tidyverse",
"magrittr",
"readxl",
"haven",
"jsonlite",
"httr",
"rvest",
"DBI",
"readODS", # Import ODS (OpenDocument Spreadsheet", into R as a data
"rmatio", # Reading and writing Matlab MAT files from R
"readxl", # reading excel sheets into R
"lubridate",
"hms",
"blob",
"reshape", # flexibly reshape data with melt and cast
"reshape2", # again
"magrittr",
"glue",
"GGally",
"gganimate",
"ggExtra",
"ggfittext",
"ggformula",
"ggridges",
"ggnetwork",
"ggvis",
"ggrepel",
"ggtern",
"ggthemes",
"ggmap", # ggmap for maps
"gcookbook", # package contains data sets used in r graphics cookbook"
"lattice", # lattice package
"timevis", # create rich and fully interactive timeline visualizations
"tidymodels",
"ISLR", # introduction to statistical learning package
"e1071", # misc functions from dept of stats, prob theory group
"memisc", # tools for managing survey data presentation of analysis
"Hmisc", # contains many functions useful for data analysis,
"LOGIT", # functions, data and code for PGLR
"caret", # model data
"broom", # data frames for messy output of built-in functions in R
"faraway", # linear models in R
"AppliedPredictiveModeling", # applied predicitive modeling book
"regtools", # regression tools
"skimr", # tiny histograms
"janitor", # crosstabs and nice tables
"tableone", # create tables
"urltools", # A toolkit for all URL-handling needs
"csvy", # import and export csv data with a yaml metadata header
"feather", # access a feather store like a data frame
"fst", # read and write data frames at high speed.
"datapasta", # easy copy and paste
"gutenbergr", # download and process public domain works in project
"tidytext", # text manipulation/modeling (tidy approach",
"scales", # commas
"stringi", # string manipulation
"xtable", # coerce data to latex and html tables
"rmdformats", # formatting Rmd files
"rmdHelpers", # helpers
"furniture", # crosstabulations of variables
"styler", # style code easily
"nycflights13", # the infamous flights data
"Lahman", # data tables from the 'Sean Lahman Baseball Database'
"Ecdat", # data sets for econometrics
"HistData", # data sets from the history of statistics and data viz
"fivethirtyeight", # data sets from http://fivethirtyeight.com/
"DBI", # provides connection to DBMS with a “front-end” and a “back-end”
"RMySQL", # MySQL driver for DBI
"RMariaDB", # MariaDB driver for DBI
"RPostgreSQL")) # PostgreSQL driver for DBI