Displaying 1 result from an estimated 1 matches for "vbarm".
Did you mean:
varm
2024 Feb 29
2
Initializing vector and matrices
You could declare a matrix much larger than you intend to use. This works with a few megabytes of data. It is not very efficient, so scaling up may become a problem.
m22 <- matrix(NA, 1:600000, ncol=6)
It does not work to add a new column to the matrix, as in you get an error if you try m22[ , 7] but convert to data frame and add a column
m23 <- data.frame(m22)
m23$x7 <- 12
The only