I want to create a matrix from character vector similar to:
comments <- c("abc", "lol")
comm_matrix <- matrix(data=comments, ncol=3, nrow=1)
I want to get matrix, but with NA if ncol > nchar in vector:
[,1] [,2] [,3]
abc lol NA
Instead of default:
[,1] [,2] [,3]
abc lol abc