2012-01-07から1日間の記事一覧

Rcppレファレンスサイトで使えるC/C++関数を見つける

Rcppを使って、乱数を作る話を書いた(こちら) library(Rcpp) library(inline) src<-' RNGScope z; int n=as<int>(N); double m=as<double>(M); return rexp(n, m); ' fx.rexp <- cxxfunction(signature(N="integer",M="numeric"),src,plugin="Rcpp") 上記のsrc これはC++</double></int>…