I have a list filled with 5x5 matrices and am trying to convert each matrix in the list to a vector using a for loop as follows,

```
listT<-list()
number <- 0

for(a in 0:3){
  for(i in 1:(5-a)){
    for(j in 1:(5-a)){
      A<-matrix(0,nrow=5,ncol=5)
      A[c(i:(i+a)),c(j:(j+a))]<-1
      number<-number+1
      listT[[number]]<-A

       }

   }

}

vectors<-matrix(0,25,54)
for (number in 1:54){
  vectors[,number] <- t(as.vector(listT[[number]]))
}

```

But it is coming up with the error message "Error in vectors[,number] <- t(as.vector(listT[[number]])) : incorrect number of subscripts on matrix"
I want to get an output of 54 vectors of length 25.