[R] Armadillo error in R extension

Michael Weylandt michael.weylandt at gmail.com
Sat Feb 2 00:14:23 CET 2013


Look up the terribly wonderful RcppArmadillo package. 

MW

On Feb 1, 2013, at 8:38 PM, Simon Zehnder <szehnder at uni-bonn.de> wrote:

> Is there anyway with some experience in using armadillo in R C++ extensions?
> 
> My problem is the following:
> 
> I programmed a function in a header looking like
> 
> #include <armadillo>
> 
> inline arma::vec foo(input) {
> 
>    ... do something
>    
>    return an arma::vec object 
> }
> 
> compiling this via R CMD INSTALL packagename (PKG_CXXFLAGS = -I/folder/of/armadillo and armadillo_bits in my package)
> 
> I get the following error 
> 
> "error: expected initializer before 'foo' "
> 
> The exact line and word is where inline arma::vec ends.
> 
> Does anyone know what this error could be? 
> 
> 
> Best
> 
> Simon
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list