if (FALSE) {
fx <- cxxfunction(signature(x = "integer", y = "numeric"),
"return Rf_ScalarReal( INTEGER(x)[0] * REAL(y)[0]);")
package.skeleton("foo", fx)
functions <- cxxfunction(list(ff = signature(),
gg = signature(x = "integer", y = "numeric")),
c("return R_NilValue ;",
"return Rf_ScalarReal(INTEGER(x)[0] * REAL(y)[0]);"))
package.skeleton("foobar", functions)
}
Run the code above in your browser using DataLab