Re: [R] Re sampling with index

2008-12-09 Thread Henrique Dallazuanna
Try this: x[x$ind %in% sample(x$ind, 3),] On Tue, Dec 9, 2008 at 3:19 PM, legendy <[EMAIL PROTECTED]> wrote: > > Hallo, All, > > I have a question needs your help. > I just want get a sample with the original index. For example, I have a > dataset, > > ind x > 139 > 224 > 315 > 4

[R] Re sampling with index

2008-12-09 Thread legendy
Hallo, All, I have a question needs your help. I just want get a sample with the original index. For example, I have a dataset, ind x 139 224 315 475 561 After resample, I want to get a new dataset like this (with the original index) ind x 315 561 139 Thank y