3
私はinline
とRcpp Webページから簡単なRcpp exampleをコンパイルしようとしています:Rcppコンパイルエラー
Rcpp::NumericVector orig(vector);
Rcpp::NumericVector vec(orig.size());
std::transform(orig.begin(),orig.end(),vec.begin(),sqrt);
return Rcpp::List::create(Rcpp::Named("result")=vec,Rcpp::Named("original") =orig);
しかし、私は次のエラーを取得:
no matching function for call to 'transform(Rcpp::traits::storage_type<14>::type*, Rcpp::traits::storage_type<14>::type*, Rcpp::traits::storage_type<14>::type*, <unresolved overloaded function type>)
私はRtoolsでWindows XPを使用しています(他のSTLを使用しない例があります!)、R 2.12.0。
@Dirk Eddelbuettel [ここ](http://dirk.eddelbuettel.com/code/rcpp.examples.html)あなたは行きます。それはうまくいく! – teucer
私は、 'sqrt'の前に必要な' :: 'を追加することでhtmlページも修正しました。 –
@Dirk Eddelbuettel in sugar 'sqrt'はリストされていません(少なくとも私はそれを見ていません:))すべてのsugar関数のリストはありますか? – teucer