[R] How to extract every nth element from a vector

Barry Cooke bcooke at ualberta.ca
Wed Mar 28 17:10:42 CEST 2001


R-helpers:

Is there a simple way to extract every nth element from a very long vector?

[The vector I want to sample from is an object returned by lowess(). It is
so long (11,628 pairs of elements) that it is causing non-R-related memory
problems elsewhere. I don't see a better way other than sampling the output
returned from lowess.]

Thanks in advance.

Barry Cooke

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list