Re: [R] Random subset

From: Roland Rau <roland.rproject_at_gmail.com>
Date: Wed, 30 Jul 2008 14:27:04 -0400

Hi,

check
?sample

n <- 200
mydata.set <- rnorm(100000)
my.random.subset <- sample(x=mydata.set, size=n, replace=TRUE)

my.random.subset

I hope this helps,
Roland

Alessandro wrote:
> Hi all,
>
>
>
> I wish to do a random subset (i.e. 200 or 300 points) from a dataset, but I
> don't find the right code in R.
>
>
>
> Thanks for help
>
>
>
> alessandro
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



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. Received on Wed 30 Jul 2008 - 18:41:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Jul 2008 - 19:32:59 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive