- Description
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module gives you the ability to install R and also R packages.
To install R you need to include the class:
class { '::r': }
To install a specific version of R:
class { '::r': version => '3.2.1' }
Then define any packages you want to be installed...
::r::package { 'ggplot2': }
::r::package { 'reshape': }
To ensure that dependencies are resolved for packages...
::r::package { 'reshape': dependencies => true, }
If a different repo is needed then it must be given as an array, also, an array of different repos can be given.
::r::package { 'ggplot2': repo => ['http://cran.rstudio.com', ], }
::r::package { 'datashieldclient': repo => ['http://cran.obiba.org', 'http://cran.rstudio.com'],
dependencies => true, }
class r::install ( $version = 'latest' )
This sub module installs and the R package to the system. $version
defines the version of R to be
installed. Default is latest.
class r::repository
Installs the R yum or apt-get repo onto the system. Called by install
define r::package($r_path = '/usr/bin/R', $repo = ['http://cran.rstudio.com',], $dependencies = false)
Installs an R package to the system. $r_path
defines the path where R is installed, default '/usr/bin/R'
.
$repo
defines the array of repos to search when installing packages. Default is the single array
['http://cran.rstudio.com',]
. $dependencies
defines if the dependencies of the packages shouls also be
installed. Default is false.
Has only been tested on Ubuntu 14.04 and Centos 7.
Open source, forks and pull requests welcomed.