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

Function runit_ifelse

inst/tinytest/cpp/sugar.cpp:180–187  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

178
179// [[Rcpp::export]]
180List runit_ifelse( NumericVector xx, NumericVector yy){
181 return List::create(
182 _["vec_vec" ] = ifelse( xx < yy, xx*xx, -(yy*yy) ),
183 _["vec_prim"] = ifelse( xx < yy, 1.0 , -(yy*yy) ),
184 _["prim_vec"] = ifelse( xx < yy, xx*xx, 1.0 ),
185 _["prim_prim"] = ifelse( xx < yy, 1.0, 2.0 )
186 ) ;
187}
188
189// [[Rcpp::export]]
190LogicalVector runit_isna( NumericVector xx){

Callers

nothing calls this directly

Calls 1

ifelseFunction · 0.85

Tested by

no test coverage detected