[Rcpp-devel] file name changed in package
chaomeilo at gmail.com
Fri May 23 00:38:26 CEST 2014
I have created R packages using Makevars and it works pretty good for me.
I am able to convert from a Rcpp::NumericVector to std::vector as in below.
*NumericVector col_cts = buildMatrix(Xr);vector<long unsigned int>
col_counts = Rcpp::as<vector<long unsigned int>>(col_cts); *
Now I am having a problem with an application involves the Trilinos
library. Here below I am trying to convert a Rcpp::NumericVector to
Teuchos::ArrayRCP<size_t> in the following line, it gave me errors as shown
below in red. Would you please help me with this ?
Thanks a lot.
In file included from
In constructor 'Rcpp::traits::Exporter<T>::Exporter(SEXP) [with T =
RCP<long unsigned int>, SEXP = SEXPREC*]':
instantiated from 'T Rcpp::internal::as(SEXP,
Rcpp::traits::r_type_generic_tag) [with T =
Teuchos::ArrayRCP<long unsigned int>, SEXP = SEXPREC*]'
instantiated from 'T Rcpp::as(SEXP) [with T = Teuchos::ArrayRCP<long
unsigned int>, SEXP
buildMatrix.cpp:84:87: instantiated from here
error: invalid conversion from 'SEXP' to 'long int' [-fpermissive]
error: initializing argument 1 of 'Teuchos::ArrayRCP<T>::ArrayRC
P(Teuchos::ArrayRCP<T>::size_type, const T&) [with T = long unsigned int,
Teuchos::ArrayRCP<T>::size_type = long int]' [-fpermissive]
make: *** [buildMatrix.o] Error 1
ERROR: compilation failed for package 'Tpkg'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel