Hi all, I've copied the following from a portion of the "Using matrices" section of the Rcpp Quick Reference guide<http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-quickref.pdf>. I get a compilation error that I'm having trouble decoding. Commenting out the third line allows it to compile, so it must be something I've done wrong with the column selector, but I don't see it.
Thanks in advance, Chris PS. My g++ version is 4.5.2, in case that helps. src <- ' NumericMatrix xx(4, 5); std::fill(xx.begin(), xx.end(), 8); NumericMatrix::Column zzcol = xx( _, 1); return(wrap(1)); ' fun <- cxxfunction(signature(x="numeric"), body = src, plugin="Rcpp") file3011595e.cpp:35:39: error: invalid conversion from ‘SEXPREC*’ to ‘int’ file3011595e.cpp:35:39: error: initializing argument 1 of ‘Rcpp::Matrix<RTYPE>::Proxy Rcpp::Matrix<RTYPE>::operator()(int, int) [with int RTYPE = 14, Rcpp::Matrix<RTYPE>::Proxy = double&]’ file3011595e.cpp:35:39: error: conversion from ‘Rcpp::traits::storage_type<14>::type’ to non-scalar type ‘Rcpp::Matrix<14>::Column’ requested make: *** [file3011595e.o] Error 1
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel