Create a skeleton for a new package that intends to use RcppArmadillo
RcppArmadillo.package.skeleton automates the creation of
a new source package that intends to use features of RcppArmadilo.
It is based on the package.skeleton function
which it executes first.
RcppArmadillo.package.skeleton(name = "anRpackage", list = character(), environment = .GlobalEnv, path = ".", force = FALSE, code_files = character(), example_code = TRUE)
In addition to package.skeleton :
The DESCRIPTION file gains a Depends line requesting that
the package depends on Rcpp and RcppArmadillo and
a LinkingTo line so that the package finds Rcpp and RcppArmadillo header files.
The NAMESPACE, if any, gains a
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.
example_code argument is set to
example files rcpparma_hello_world.h and rcpparma_hello_world.cpp
are also created in the src. An R file rcpparma_hello_world.R is
expanded in the R directory, the
defined in this files makes use of the C++ function rcpparma_hello_world
defined in the C++ file. These files are given as an example and should
eventually by removed from the generated package.
Nothing, used for its side effects
Read the Writing R Extensions manual for more details.
## Not run: # RcppArmadillo.package.skeleton( "foobar" ) # ## End(Not run)