classroom/roles/classroom/tasks/rstudio.yml

88 lines
2.1 KiB
YAML
Raw Normal View History

2022-09-16 13:21:43 +00:00
- name: Install R
2022-09-15 13:24:00 +00:00
win_chocolatey:
2022-09-16 13:21:43 +00:00
name: r.project
package_params: /AddToPath
- name: Install RStudio
win_chocolatey:
name: r.studio
2022-09-15 13:24:00 +00:00
- name: Create configuration directory
win_file:
path: "%PROGRAMDATA%\\RStudio"
state: directory
- name: Disable crash reporting
win_copy:
dest: "%PROGRAMDATA%\\RStudio\\crash-handler.conf"
content: crash-handling-enabled=0
- name: Disable update notifications
win_copy:
dest: "%PROGRAMDATA%\\RStudio\\rstudio-prefs.json"
content: { "check_for_updates": false }
2022-09-16 13:21:43 +00:00
#- name: Install packages
# win_command: Rscript -
# args:
# stdin: |
# install.packages(c("tidyverse", "lpSolveAPI", "igraph", "quadprog", "GenSA", "lattice", "tabuSearch", "MASS", "e1071", "metaheuristicOpt", "DEoptim", "DEoptimR") , repos = "http://cran.rstudio.com")
# install.packages(c("rpart", "rpart.plot", "nnet", "CORElearn", "e1071", "randomForest", "kernlab", "kknn", "neuralnet", "keras", "cluster", "RSNNS", "NMF", "class", "reshape2", "arules", "viridisLite", "arulesViz", "bnlearn", "ipred", "adabag", "caret", "smotefamily", "graphics", "aplpack", "Radviz") , repos = "http://cran.rstudio.com")
- name: Find R directory
win_find:
paths: C:\Program Files\R
patterns: ['R-*']
file_type: directory
register: base
- name: Find installed R libraries
win_find:
paths: "{{ base.files[0].path }}\\library"
file_type: directory
register: libs
- name: Install R packages
win_command: Rscript -
args:
stdin: install.packages(c("{{ item }}"), repos = "http://cran.rstudio.com")
when: item not in (libs.files|map(attribute='filename'))
loop:
- CORElearn
- DEoptim
- DEoptimR
- GenSA
- MASS
- NMF
- RSNNS
- Radviz
- adabag
- aplpack
- arules
- arulesViz
- bnlearn
- caret
- class
- cluster
- e1071
- graphics
- igraph
- ipred
- keras
- kernlab
- kknn
- lattice
- lpSolveAPI
- metaheuristicOpt
- neuralnet
- nnet
- quadprog
- randomForest
- reshape2
- rpart
- rpart.plot
- smotefamily
- tabuSearch
- tidyverse
- viridisLite