Learn R Programming

inline (version 0.3.19)

package.skeleton-methods: Generate the skeleton of a package

Description

Generate the skeleton of a package

Arguments

Methods

signature(name = "ANY", list = "ANY")

Standard method. See package.skeleton

signature(name = "character", list = "CFunc")

Method for a single generated by cfunction or cxxfunction

signature(name = "character", list = "CFuncList")

Method for a set functions generated by cfunction or cxxfunction

Examples

Run this code
# 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