README.md

InstallR Build Status

Installs libraries for an R script

What is this?

This little package can install and load libraries which are needed for any R script. It scan through the script file, then install the dependencies. Also you can define a yaml file, that contains the dependencies and the package will load/install them.

Why?

I wrote this package for fun and learning purpose. But I hope, that it will may useful for somebody.

Usage

Installing

library(devtools)
install_github("horver/InstallR")

Functions

This function installs and loads (if load TRUE) the libraries which are given by a c() vector.

install_from_list(c("RUnit", "caret"), load = TRUE)

This function scans through an R script or scripts ( c("file1.R", "file2.R") ) then installs and loads (if load TRUE) the libraries.

install_from_script("file.R", load = TRUE)

Needed libraries are in a *.yml file. The structure should look like this:

deps:
  - testthat
  - RUnit
  - caret
load: true

And usage of the function:

install_from_yml("deps.yml", load = TRUE)


horver/InstallR documentation built on May 20, 2019, 6:46 p.m.