Hi.
See ?sample, ?replicate,?colMeans, ?plot..

Here is the simple example:

sample(1:1000,20)
replicate(5, sample(1:1000,20))
colMeans(replicate(5, sample(1:1000,20)))

Andrija


On Wed, Jul 31, 2013 at 1:23 PM, Rita Gamito <[email protected]> wrote:

> Could anyone tell me how,from a pool of 1002 observations (one variable),
>  can I resample 1000 samples of 20 observations?
> And then calculate the mean and standard deviation between 2, 3, 4, ...,
> 1000 samples and plot them?
> Thank you!
>
> _____________________________________
>
> Rita Gamito
> Centro de Oceanografia
> Faculdade de Ciências, Universidade de Lisboa
> Campo Grande, 1749-016 Lisboa, Portugal
> e-mail: [email protected]
> Tel: + 351 21 750 00 00 - ext. 22575
> Fax: + 351 21 750 02 07
> www.co.fc.ul.pt
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to