[R] Odp: how to sample a block
petr.pikal at precheza.cz
Mon Nov 10 13:48:01 CET 2008
r-help-bounces at r-project.org napsal dne 10.11.2008 13:25:41:
> I want to sample a block of information.
> Let's say x is a time series. Using sample(x,5) I get a random sample of
> length 5 from x.
> Is it possible to sample consecutive observations, i.e. I sample one
> observation and also get the next 4 observations?
sam <- sample(x,1)
> Thanks a lot!
> View this message in context:
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help