Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
man
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Example Package using splines2 with Rcpp

Since v0.3.0, the splines2 package provides C++ interface for constructing regression spline bases. This repository contains an example package that demonstrates its usage with help of Rcpp.

Get Started

Firstly, in DESCRIPTION, we need

  • include Rcpp in Imports
  • include Rcpp, RcppArmadillo, and splines2 (>=0.3.0) in LinkingTo

Secondly, we need add the following lines to a C++ script:

#include <RcppArmadillo.h>
// [[Rcpp::plugins(cpp11)]]

// include header file from splines2 package
#include <splines2Armadillo.h>

Then we have access to the routines to create spline bases under name space named splines2. For example, we may create a default B-spline object as follows:

splines2::BSpline bs_obj;

See one of the splines2 package vignettes for more detailed introduction to the C++ interface.

About

Example Package using splines2 with Rcpp

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.