Add tests for R builds

This commit is contained in:
Greg Lin 2022-08-10 17:17:01 -05:00
commit 1de359f3e6

View file

@ -0,0 +1,10 @@
#include <R.h>
#include <Rinternals.h>
extern "C" SEXP subtract(SEXP a, SEXP b)
{
SEXP result = PROTECT(allocVector(REALSXP, 1));
REAL(result)[0] = asReal(a) - asReal(b);
UNPROTECT(1);
return result;
}