Slide 11/68 explains how to include RcppArmadillo. Just install the package 'RcppArmadillo' like a normal package in RStudio. Then New-->C++ file will pull up the C++ file template in RStudio. Replace #include <Rcpp.h> with #include <RcppArmadillo.h> and add in // [[Rcpp::depends(RcppArmadillo)]] and you're all set.
See these slides. (Reproduced below). Slide 11/68 explains how to include RcppArmadillo. Just install the package 'RcppArmadillo' like a normal package in RStudio. Then New-->C++ file will pull up the C++ file template in RStudio. Replace #include <Rcpp.h> with #include <RcppArmadillo.h> and add in // [[Rcpp::depends(RcppArmadillo)]] and you're all set.
0 Comments
|
Categories
All
Archives
December 2016
AboutThis blog is mainly for statistics, R, or Duke-related stuff that is not directly relating to research activity. |