MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / lapplyCpp

Function lapplyCpp

inst/examples/Attributes/Export.cpp:32–40  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

30
31// [[Rcpp::export]]
32List lapplyCpp(List input, Function f) {
33
34 List output(input.size());
35
36 std::transform(input.begin(), input.end(), output.begin(), f);
37 output.names() = input.names();
38
39 return output;
40}

Callers

nothing calls this directly

Calls 4

namesMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected