[R] Randomly split a sample in two equal subsamples

Wu Gong wg2f at mtmail.mtsu.edu
Sun Oct 31 19:06:47 CET 2010


firsthalf <- myframe[v1,]

or

firsthalf <- subset(myframe, number %in% v1) 


-----
A R learner.
-- 
View this message in context: http://r.789695.n4.nabble.com/Randomly-split-a-sample-in-two-equal-subsamples-tp3021140p3021353.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list