Nothing
test_that("compilation works", {
code <- "
#include <R.h>
#include <Rinternals.h>
SEXP add(SEXP val1, SEXP val2) {
return ScalarReal(asReal(val1) + asReal(val2));
}
"
# Keep reference to returned object.
# C library will be unloaded when 'dll' variable is garbage collected.
compile(code)
# Manual call
expect_equal(add(1, 2.5), 3.5)
expect_equal(add(99.5, 0.5), 100)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.