Hi,

you can use something like

> example.data <- data.frame(x=rnorm(209), y=rnorm(209))
> selected.sample <- example.data[sample(209,106), ]

See ?sample.

-Heinrich.

> -----Urspr�ngliche Nachricht-----
> Von: Savano [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 01. Dezember 2003 13:38
> An: Lista R
> Betreff: [R] Sampling
> 
> 
> UseRs,
> 
> I imported a table using "read.table". It has 209 
> observations, I want to 
> select a sample with 106 observations.  What function I use?
> 
> thanks.
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to