[Rcpp-devel] What the rcpp function does ?

PO SU rcppmail at 163.com
Fri Aug 15 07:15:01 CEST 2014



Dear Rcppusers,
  When i am learning Rcpp , i meet the following function, i can't figure out its use, May you explain to me ?
int f4(Function pred, List x) {
int n = x.size();

  for(int i = 0; i < n; ++i) {
    LogicalVector res = pred(x[i]);
    if (res[0]) return i + 1;
  }
  return0;
}



--

PO SU
rcppmail at 163.com
Majored in Statistic Shanghai JiaoTong University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140815/709bdab3/attachment.html>


More information about the Rcpp-devel mailing list