Dear mr/madam I have 3 matrix with 20 rows and 3 columns like this: I want to sample randomly from three matrix and put it in a vector.How can i do that?
Young.list1<- matrix(NA,nrow= 20,ncol=3) Young.list1[,1]<- 1:20 Young.list1[,2]<- 0.6 Young.list1[,3]<- 500 colnames(Young.list1)<- c("ID","r","EBV") ########################################### Young.list2<- matrix(NA,nrow= 20,ncol=3) Young.list2[,1]<- 21:40 Young.list2[,2]<- 0.7 Young.list2[,3]<- 600 colnames(Young.list2)<- c("ID","r","EBV") ########################################### Young.list3<- matrix(NA,nrow= 20,ncol=3) Young.list3[,1]<- 41:60 Young.list3[,2]<- 0.8 Young.list3[,3]<- 700 colnames(Young.list3)<- c("ID","r","EBV") [[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.