I wrote a function that reads data from a file and manipulates it to build
and return a matrix with a million rows and three columns.  I also need to
return some metadata:  these are about a half-dozen single numbers or short
character strings, plus one numeric vector of length 5,000.  I've been
including the metadata as attributes to the matrix, but I find that
attributes can be lost upon some later manipulations of the matrix.  My
question is, what are the pros and cons of having the function return a list
instead, one that includes the matrix and the metadata, compared to how I'm
doing it now?  I'm interested in storage and retrieval efficiency, and
anything else that may be relevant.  What are your opinions?  Thanks.


Confidentiality Notice: This e-mail message, including a...{{dropped:10}}

