Hi guys,<div><br></div><div>I'm wondering -- what operations are available for subsetting of Vectors in Rcpp? I've scoured through all the vignettes but it seems like a couple 'nice-to-haves' aren't there yet. My questions:</div>
<div><br></div><div>* is there a difference between subsetting a vector with () vs []? </div><div><br></div><div>* is it possible to subset based on a collection of indices, eg:<br><br>NumericVector X(10);</div><div>NumericVector Y = X[ c(1, 2, 5) ]</div>
<div><br></div><div>* is it possible to slice a vector, eg. such that we either hold a reference to, or copy out, the elements at every 'x' indices? I know 'seq' is available for consecutive indices, but might there be a third 'by' argument coming, or an alternative function, soon?</div>
<div><br></div><div>Thanks for the help,</div><div>-Kevin</div><div><br></div>