[R] (no subject)
MARYAM
firoozi_maryam6858 at yahoo.com
Tue Jan 19 11:16:06 CET 2016
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]]
More information about the R-help
mailing list