fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , ' return wrap( as(x) * as(y) ) ; ', plugin = "Rcpp" ) fx( 2L, 5 )