Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAmySGMeXC4YLZRKoeBbp9RuuG-fuUqAHXjtYu8tO8e_u7-ZBg@mail.gmail.com>
Date: 2012-10-30T16:02:23Z
From: R. Michael Weylandt
Subject: HELP!! how to remove 10% of data randomly in R
In-Reply-To: <1351609953766-4647879.post@n4.nabble.com>

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:
> any can please tell me how to remove 10%,15%,25% and 50% of the data randomly
> by using R programme???
> can anyone please show me the coding?
> do i need to install any package?
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/HELP-how-to-remove-10-of-data-randomly-in-R-tp4647879.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.