[R] Linear regression on dataframe's sample

Hard Core gioxc at hotmail.it
Sat Nov 3 01:04:39 CET 2012


I fount out a solution ... check it out

random_sample = function (dt, sample_size) {
   # determine the number of records in the data frame
   length_dt = length (dt[,1])
   # extract the sample
   dt [sample (1:length_dt, size = sample_size),]
}





--
View this message in context: http://r.789695.n4.nabble.com/Linear-regression-on-dataframe-s-sample-tp4648288p4648291.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list