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

Function asStdVectorInt

inst/tinytest/cpp/RObject.cpp:51–57  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

49
50// [[Rcpp::export]]
51std::vector<int> asStdVectorInt( SEXP x){
52 std::vector<int> iv = as< std::vector<int> >(x);
53 for (size_t i=0; i<iv.size(); i++) {
54 iv[i] = 2*iv[i];
55 }
56 return iv ;
57}
58
59// [[Rcpp::export]]
60std::vector<double> asStdVectorDouble(SEXP x){

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected