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.
- Nov 29, 2015 Plotly package added
- Nov 28, 2015 RPostgreSQL Integration (works with RedShift)
- Sep 11, 2015 Running R Statistics in AWS Lambda (original)
- Project size ~40 MB to meet the AWS Lambda requirements that allows sizes up 50MB
Plotly example (read more)
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
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
> (today <- Sys.Date())  "2015-09-19" > (year <- format(today, "%Y"))  "2015" > (birthYear <- commandArgs(trailingOnly=TRUE))  "1988" > as.numeric(year) - as.numeric(birthYear)  27 >
- Currently it does not include curl package (http requests not supported).
Please report issues in GitHub.
subscribe via RSS