This directory contains application subdirectories that produce deterministic output on stdout/stderr. After flushing output once, each app exits (due to session$onFlushed(stopApp)
).
Rscript snapshot.R
runs each app and visits it using phantomjs. The resulting stdout/stderr output is written to an R.out.save
file in the app directory.
Rscript test.R
also runs each app, but instead of saving to R.out.save
, the results are compared to the R.out.save
and any discrepancy is reported as test failure.
phantomjs
must be in your path (tested with phantomjs 1.9, but later versions should be fine). On Ubuntu this is simply apt-get install phantomjs
. On Mac if you have homebrew you can do brew install phantomjs
. Otherwise, see http://phantomjs.org/download.html.
session$onFlushed(stopApp)
to your server function.Rscript snapshot.R
.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.