Displaying 1 result from an estimated 1 matches for "tp4637769p4639190".
2012 Aug 02
1
sapply and matrix command
HI,
You can also try this:
d<-1:25
A<-sample(combn(20:30,2))
B<-sample(combn(20:30,2))
lapply(d,function(x) matrix(c(1,A[x],B[x],1),2,2))
[[1]]
[,1] [,2]
[1,] 1 23
[2,] 27 1
[[2]]
[,1] [,2]
[1,] 1 21
[2,] 21 1
[[3]]
[,1] [,2]
[1,] 1 29
[2,] 23 1
[[4]]
[,1] [,2]
[1,] 1 25
[2,] 20 1
[[5]]
[,1] [,2]
[1,] 1 23
[2,]