Hi, Mike, thank you very much!!:)
the following two functions are really helpful, which I didn't even know. Actually, I searched the forum for something like this, but failed. Now I am still trying to make up my own functions. :) sample(a[,2],2) #randomly draw two numbers from a column sample(a[2,],2) #randomly draw two numbers from a row -- View this message in context: http://r.789695.n4.nabble.com/New-Sampling-question-tp3047885p3049083.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.