miceadds (version 3.17-44)

cxxfunction.copy: R Utilities: Copy of an Rcpp File

Description

Copies the Rcpp function into the working directory.

Usage

cxxfunction.copy(cppfct, name)

Arguments

cppfct

Rcpp function

name

Name of the output Rcpp function to be generated

References

Eddelbuettel, D. & Francois, R. (2011). Rcpp: Seamless R and C++ integration. Journal of Statistical Software, 40(8), 1-18. tools:::Rd_expr_doi("10.18637/jss.v040.i08")

See Also

inline::cxxfunction

Examples

Run this code
if (FALSE) {
#############################################################################
# EXAMPLE 1: Rcpp code logistic distribution
#############################################################################

library(Rcpp)
library(inline)

# define Rcpp file
code1 <- "
    // input array A
    Rcpp::NumericMatrix AA(A);
    // Rcpp::IntegerVector dimAA(dimA);
    int nrows=AA.nrow();
    int ncolumns=AA.ncol();
    Rcpp::NumericMatrix Alogis(nrows,ncolumns)  ;
    // compute logistic distribution
    for (int ii=0; ii

Run the code above in your browser using DataLab