| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/josh28x/cpp11/main/cpp11test/src/add.cpp | [Back] [Original] |
#include "cpp11/doubles.hpp"
[[cpp11::register]] SEXP cpp11_add_vec_for_(cpp11::writable::doubles x, double num) {
R_xlen_t n = x.size();
for (R_xlen_t i = 0; i < n; ++i) {
double cur = x[i];
x[i] = cur + num;
}
return x;
}
| Web Proxy Viewer | New URL | Original Page |