Description Usage Arguments Details
View source: R/registerFunctions.R
This function can be used to automatically register the native routines
in a package. It searches all of the .c and .cpp files in
src, excluding the file <pkgname>_init.c, finds functions
annotated with // [[register]], and extracts the
required information needed to register routines in the package.
The necessary routines are written to a file called
src/<pkgname>_init.c.
1 | registerFunctions(prefix = "C_")
|
prefix |
A prefix to append to the exported name, so
that a function called |
This function should be called from the base directory of an R package you are developing.
Currently, the assumption is that all functions in a package use the
.Call interface; i.e., there are no functions using the .C,
.Fortran, or .External interfaces – this may be
added in a future version.
After calling this function, ensure that you have
useDynLib(<pkg>, .registration=TRUE) in your NAMESPACE.
If you use roxygen to document your package, you can
use
##' @useDynLib <pkg>, .registration=TRUE
somewhere in your roxygen documentation to achieve the same effect.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.