R/matrix_utils.R
write_matrix.Rd
For a matrix with N columns, write_matrix() and read_matrix(N) are thought to be mutual inverse.
write_matrix()
read_matrix(N)
write_matrix(mat, file)
matrix to be written
file to write to
read_matrix()
m <- matrix(1:6, ncol = 3) tf <- tempfile() write_matrix(m, tf) rm3 <- read_matrix(3) rm3(tf) #> [,1] [,2] [,3] #> [1,] 1 3 5 #> [2,] 2 4 6