Skip to content

splitting matrices

1 message · arun

#
Hi Elisa,

If the total number of elements in each of the list elements/372 are integer values, then 
set.seed(24)
l1<-lapply(c(4,5,8,10),function(i) as.data.frame(matrix(sample(1:50,40,replace=TRUE),ncol=i)))
lapply(l1,function(x) matrix(as.vector(as.matrix(x)),nrow=5))

#in your case:

lapply(mls,function(x) matrix(as.vector(as.matrix(x)),nrow=372))
A.K.