There is also crossval function in bootstrap package

best wishes

"Ido M. Tamir" <tamir@imp.univie.ac.at> wrote: On Monday 13 August 2007 04:25, Li Xiao wrote:
> Hi ALL,
>
>    How to randomly divide my sample (a data.frame) into ten separate equal
> sets for cross validation?
>
> Thanks
> LiXiao

sz <- 10
df <- data.frame(label=1:100,score=rnorm(100))
dfrand <- df[sample(1:nrow(df)),]
dfsplit <- split(dfrand,rep(1:sz,nrow(df)/sz))

best wishes
ido

_______________________________________________
Bioconductor mailing list
Bioconductor@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


       
---------------------------------

	[[alternative HTML version deleted]]

