Using Your Local R Environment to Deploy Blockspring Functions

Install the Blockspring R Package

If you look at the first line of code in block.R, you'll see that it depends on the Blockspring package. This package assists in passing parameters to your function as JSON via STDIN, and provides helpers for defining and calling other Blockspring functions.

To install the library for R, run the following from your shell:

$ Rscript -e "r <- getOption('repos'); r['CRAN'] <- ''; options(repos = r); install.packages('devtools'); library('devtools'); install_github('blockspring/blockspring.R')"
also installing the dependencies ‘stringr’, ‘bitops’, ‘httr’, ‘RCurl’, ‘memoise’, ‘whisker’, ‘evaluate’, ‘digest’, ‘rstudioapi’, ‘jsonlite’

.....  dependency installation messages ....

* installing *source* package ‘blockspring’ ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (blockspring)

Blockspring functions can use any package you have installed on your computer when they're executing locally, but a limited number of packages are available for when your function runs in the cloud. Visit available packages for more info.

Now that you have the package installed we can start executing your function locally.