I can do this by writing (and reading) the file according to some format of
my own devising, but I'm wondering if there is a built-in way to write and
then restore a matrix with not only the dimnames (which
write.table/read.table can preserve) but also the names(dimnames)?

Example:
> M <- matrix(1:4, 2, 2)
> dimnames(M) <- list(xdim=c("a", "b"), ydim=c("u", "v"))
> M
    ydim
xdim u v
   a 1 3
   b 2 4


-- 
View this message in context: 
http://www.nabble.com/write-matrix-M-including-names%28dimnames%28M%29%29-tp24750637p24750637.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to