portableR is a version of R statistics that have all their static libraries within the same folder, this lets run in x86_64 VMs. This project is aimed to run in web servers to build microservices (AWS Lambda) that require R to process data, png chart generation, etc.

News

Features

 Notable packages

Plotly example (read more)

Usage

Unzip the project in your work directory, for exmaple in the user homedir (see run.sh file).

Setup environment variables:

export LD_LIBRARY_PATH=`pwd`/lib
export R_HOME=`pwd`
export R_LIBS=`pwd`/site-library

Check version

./R --version

Output

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

Run R script with params

You need to pass the absolute path of the script.

./R --no-restore --file=`pwd`/examples/age.R --args 1988

Output

> (today <- Sys.Date())
[1] "2015-09-19"
> (year <- format(today, "%Y"))
[1] "2015"
> (birthYear <- commandArgs(trailingOnly=TRUE)[1])
[1] "1988"
> as.numeric(year) - as.numeric(birthYear)
[1] 27
>

Examples

Future work

Collaboration

Please report issues in GitHub.

subscribe via RSS