kvh_get_matrix {kvh} | R Documentation |
Given a read connection to kvh file and a vector of keys pointing to a matrix, return this matrix
kvh_get_matrix(f, v)
f |
connection from which kvh file can be read |
v |
character vector of key-subkeys pointing to a matrix |
It is expected that matrix in the kvh file has its upper-leftmost item called "row_col" and it has rownames in the first column and colnames in the first row.
matrix read from kvh
# write a test matrix obj2kvh(list(comment="this is a test matrix", m=diag(2)), "li", "test.kvh") # read it back mr=kvh_get_matrix(file("test.kvh"), c("li", "m"))