R Turning a list into a matrix when the list contains objects of “different size”
问题 I've seen a couple of questions about turning matrices into lists (not really clear why you would want that) but the reverse operation I've been unable to find. Basically, following # ind.dum = data frame with 29 observations and 2635 variables for (i in 1:ncol(ind.dum)) tmp[[i]]<-which(rollapply(ind.dum[,i],4,identical,c(1,0,0,0),by.column=T)) I got a list of 2635 objects, most of which contain 1 value, bust some up to 7. I'd need to convert this to a matrix with 2635 rows and as many