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

Function clone

inst/include/Rcpp/clone.h:33–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 - T has a SEXP constructor
32*/
33template <typename T> T clone(const T& object) {
34 Shield<SEXP> x(const_cast<T&>(object));
35 Shield<SEXP> copy(Rf_duplicate(x));
36 return T((SEXP)copy);
37}
38
39} // namespace Rcpp
40

Callers 12

logTestFunction · 0.85
expTestFunction · 0.85
sqrtTestFunction · 0.85
integer_clone_Function · 0.85
cloneMethod · 0.85
sampleFunction · 0.85
MedianMethod · 0.85
MedianMethod · 0.85
MedianMethod · 0.85
MedianMethod · 0.85
MedianMethod · 0.85
MedianMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected