Subscribed unsubscribe Subscribe Subscribe

CPSAM.org

computer, programming, statistics and more!

hello rstan

rstanが動くかどうかの確認コード

library(inline) 
library(Rcpp)
src <- ' 
  std::vector<std::string> s; 
  s.push_back("hello");
  s.push_back("world");
  return Rcpp::wrap(s);
'
hellofun <- cxxfunction(body = src, includes = '', plugin = 'Rcpp', verbose = FALSE)
cat(hellofun(), '\n') 
Remove all ads