RcppMLPACK.package.skeleton: Create a skeleton for a new package that intends to use...

Description Usage Arguments Details Value References See Also Examples

View source: R/RcppMLPACK.package.skeleton.R

Description

RcppMLPACK.package.skeleton automates the creation of a new source package that intends to use features of RcppMLPACK.

It is based on the package.skeleton function which it executes first.

Usage

1
2
3
RcppMLPACK.package.skeleton(name = "anRpackage", list = character(), 
	environment = .GlobalEnv, path = ".", force = FALSE, 
	code_files = character(), example_code = TRUE)

Arguments

name

See package.skeleton

list

See package.skeleton

environment

See package.skeleton

path

See package.skeleton

force

See package.skeleton

code_files

See package.skeleton

example_code

If TRUE, example c++ code using RcppMLPACK is added to the package

Details

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 RcppMLPACK.h and kmeans.cpp are also created in the src. An R file RcppExports.R is expanded in the R directory, the mlkmeans function defined in this files makes use of the C++ function mlkmeans defined in the C++ file. These files are given as an example and should eventually by removed from the generated package.

Value

Nothing, used for its side effects

References

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.

See Also

package.skeleton

Examples

1
2
3
4
## Not run: 
RcppMLPACK.package.skeleton("foobar")

## End(Not run)

thirdwing/RcppMLPACK1 documentation built on April 25, 2020, 1:06 p.m.