Skip to content

Instantly share code, notes, and snippets.

@teekaay
Created February 24, 2017 18:25
Show Gist options
  • Save teekaay/3e9356ad0538fd67512cafc61f99a96d to your computer and use it in GitHub Desktop.
Save teekaay/3e9356ad0538fd67512cafc61f99a96d to your computer and use it in GitHub Desktop.
Ansible snippet for installing R with useful packages
---
- name: R | Install RStudio dependency libjpeg62
apt:
name: libjpeg62
- name: R |Install RStudio
shell: curl https://download1.rstudio.org/rstudio-1.0.136-amd64.deb >> ~/Downloads/rstudio.deb && dpkg -i ~/Downloads/rstudio.deb
- name: R | Prepare local library
shell: mkdir -p ~/R/library
- name: R | Prepare Renviron
shell: echo "R_LIBS_USER='~/R/library/'" > ~/.Renviron
- name: R |Install base R packages
shell: Rscript -e 'install.packages("{{ item }}", repos="http://cran.r-project.org")'
with_items:
- dplyr
- tidyr
- stringr
- lubridate
- dygraphs
- ggplot2
- zoo
- data.table
- jsonlite
- httr
- devtools
- testthat
- roxygen2
- shiny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment