RcppSMC.package.skeleton
automates the creation of
a new source package that intends to use features of RcppSMC.
It is based on the package.skeleton and kitten (from pkgKitten) functions, the latter being a Wrapper around package.skeleton to make a package pass R CMD check without complaints. If pkgKitten is not installed, package.skeleton is executed instead.
RcppSMC.package.skeleton(name = "anRpackage", list = character(),
environment = .GlobalEnv, path = ".")
Nothing, used for its side effects
See package.skeleton
See package.skeleton
See package.skeleton
See package.skeleton
In addition to package.skeleton :
The DESCRIPTION file gains a Depends line requesting that the package depends on Rcpp, RcppArmadillo and RcppSMC and a LinkingTo line so that the package finds the associated header files.
The NAMESPACE, if any, gains a 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.
An example file rcppsmc_hello_world.cpp is created in the src. An R file rcppsmc_hello_world.R is
expanded in the R directory, the rcppsmc_hello_world
function
defined in this files makes use of the C++ function rcppsmc_hello_world
defined in the C++ file. These files are given as an example and should
eventually by removed from the generated package.
Read the Writing R Extensions manual for more details.
Once you have created a source package you need to install it:
see the R Installation and Administration manual,
INSTALL
and install.packages
.
package.skeleton kitten
if (FALSE) {
RcppSMC.package.skeleton( "foobar" )
}
Run the code above in your browser using DataLab