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
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
2 matches
Mail list logo