# NOT RUN {
fx <- cxxfunction(signature(x = "integer", y = "numeric"),
"return 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 ScalarReal(INTEGER(x)[0] * REAL(y)[0]);"))
package.skeleton("foobar", functions)
# }
Run the code above in your browser using DataLab