Hi Maryam, c(Young.list1[sample(1:20,5),], Young.list2[sample(1:20,5),], Young.list3[sample(1:20,5),]) # or for a more general solution nrows<-dim(Young.list1)[1] c(Young.list1[sample(1:nrows,nrows/4),], Young.list2[sample(1:nrows,nrows/4),], Young.list3[sample(1:nrows,nrows/4),])
Jim On Wed, Jan 20, 2016 at 9:03 PM, maryam firoozi < firoozi_maryam6...@yahoo.com> wrote: > thanks for repling.can you help me how to select randomely 25% from three > mattix and put it in a vector. > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.