[R] Random sampling based on the observations

Arup arup.pramanik27 at gmail.com
Tue Mar 24 05:05:27 CET 2009

Hello!I am having a problem with Random sampling in R. I have used a syntax:
mydata.sub=sample(mydata,7,replace=FALSE,prob=NULL) which allows me to
choose a random sample based on the variables(correct me if I am wrong!).
Suppose I have 10 variable and if I use the above mentioned command then it
will choose 7 variables out of the 10 randomly. My problem is that I want to
have a random sample which is not based on the variables but on the values
of the variables that is the random sample will be based on the
observations. It will be great if someone can help me out me out with a
proper syntax. Thanks in Advance.
View this message in context: http://www.nabble.com/Random-sampling-based-on-the-observations-tp22673975p22673975.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list