Description Usage Arguments Details Value References See Also Examples
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.
1 2 3 | RcppArmadillo.package.skeleton(name = "anRpackage", list = character(),
environment = .GlobalEnv, path = ".", force = FALSE, namespace = TRUE,
code_files = character(), example_code = TRUE)
|
name |
See package.skeleton |
list |
See package.skeleton |
environment |
See package.skeleton |
path |
See package.skeleton |
force |
See package.skeleton |
namespace |
See package.skeleton |
code_files |
See package.skeleton |
example_code |
If TRUE, example c++ code using RcppArmadillo is added to the package |
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 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 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 rcpparma_hello_world
function
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.
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
1 2 3 4 | ## Not run:
RcppArmadillo.package.skeleton( "foobar" )
## End(Not run)
|
Calling kitten to create basic package.
sh: 1: git: not found
sh: 1: git: not found
sh: 1: git: not found
sh: 1: git: not found
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './foobar/Read-and-delete-me'.
Adding pkgKitten overrides.
Deleted 'Read-and-delete-me'.
Done.
Consider reading the documentation for all the packaging details.
A good start is the 'Writing R Extensions' manual.
And run 'R CMD check'. Run it frequently. And think of those kittens.
Adding RcppArmadillo settings
>> added Imports: Rcpp
>> added LinkingTo: Rcpp, RcppArmadillo
>> added useDynLib and importFrom directives to NAMESPACE
>> added Makevars file with Rcpp settings
>> added Makevars.win file with RcppArmadillo settings
>> added example src file using armadillo classes
>> added example Rd file for using armadillo classes
>> invoked Rcpp::compileAttributes to create wrappers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.