阅读背景:

Rcpp中的有效子设置(相当于R“which”命令)

来源:互联网 

In Rcpp, there are various "Rcpp sugar" commands that permit nice vectorised operations in the code. In the code below I move across a data frame, break it into vectors, then use the "ifelse" and "sum" sugar commands to compute the mean of v over the rows where x equals either y or y+1. All seems to work correctly.In Rcpp, there are various "Rcpp sugar" command




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: