How to create an empty matrix in R? I am new to R. I want to fill in an empty matrix with the results of my for loop using cbind. My question is, how can I eliminate the NAs in the first column of my matrix. I include my code below: output-1) { cluster[[pindex[ip]]]=cbind(cluster[[pindex[ip]]],points[,ip]) } for a problem that ran in less than 1 second. To get rid of the first column of NAs, you..