Rclusterpp.package.skeleton
automates the creation of
a new source package that intends to use features of Rclusterpp.
It is based on the RcppEigen.package.skeleton and executes package.skeleton internally.
Rclusterpp.package.skeleton(name = "anRpackage", list = character(),
environment = .GlobalEnv, path = ".", force = FALSE, namespace = TRUE,
code_files = character(), example_code = TRUE)
useDynLib
directive.
The src directory is created if it does not exists and
a Makevars file is added setting the environment variable
PKG_LIBS to accomodate the necessary flags
to link with the Rcpp library.
If the example_code
argument is set to TRUE
,
example files rclusterpp_hello_world.h and rclusterpp_hello_world.cpp
are also created in the src. An R file rclusterpp_hello_world.R is
expanded in the R directory, the rclusterpp_hello_world
function
defined in this files makes use of the C++ function rclusterpp_hello_world
defined in the C++ file. These files are given as an example and should
eventually by removed from the generated package.
Once you have created a source package you need to install it:
see the R Installation and Administration manual,
INSTALL
and install.packages
.
## Not run:
# Rclusterpp.package.skeleton( "foobar" )
# ## End(Not run)
Run the code above in your browser using DataLab