Skip to content
Prev 309371 / 398506 Next

HELP!! how to remove 10% of data randomly in R

Nope, you can do it easily along the lines of

dat[sample(NROW(dat), NROW(dat)*(1 - 0.1)),]

But you need to spend the time understanding what all that does. Lots
of important and powerful R ideas in that little bit.

Michael
On Tue, Oct 30, 2012 at 3:12 PM, Eugenie <leemeanwei at hotmail.com> wrote: