Should be possible to store any list using I(), including a list of Matrix
objects. It would say <list> at the top, not <Matrix> (those labels are
always the column type, not cell type). One step further would be to define
a MatrixList class, with a SimpleMatrixList implementation, e.g.:

setClass("MatrixList", representation("VIRTUAL"),
         prototype = prototype(elementType = "Matrix"),
         contains = "List")

setClass("SimpleMatrixList",
         contains = c("MatrixList", "SimpleList"))

Or you might want to have a SplitMatrixList, which enforces that every
matrix has the same dimensions (like how SplitDataFrameList enforces that
all DataFrames have the same number of columns). Using I() would no longer
be necessary with these List derivatives.

Looking forward to see what you come up with :)

Michael


On Tue, Jan 22, 2013 at 5:14 AM, Tim Yates <TYates@picr.man.ac.uk> wrote:

> Good idea!
>
> Quick question though, is it possible to handle rectangular objects as
> cells (rather than columns)?
>
> So I end up with:
>
> DataFrame with 2 rows and 2 columns
>           a         b
>    <Matrix>  <Matrix>
> 1        M1        M3
> 2        M2        M4
>
> Where M1-4 are Matrix objects?
>
> Cheers,
>
> Tim
>
> PS: Originally just replied to Michael, so sent again to the list and
> added a check-mark next to the reasons I hate Outlook on the Mac
>
> From: Michael Lawrence <lawrence.michael@gene.com<mailto:
> lawrence.michael@gene.com>>
> Date: Tuesday, 22 January 2013 13:06
> To: tim <tyates@picr.man.ac.uk<mailto:tyates@picr.man.ac.uk>>
> Cc: "bioconductor@r-project.org<mailto:bioconductor@r-project.org>" <
> bioconductor@r-project.org<mailto:bioconductor@r-project.org>>
> Subject: Re: [BioC] Class for a DataFrame of Matrices
>
> Hi Tim,
>
> DataFrame is meant to handle rectangular objects as columns, and it
> supports the base 'matrix'. It would not be hard to accommodate the Matrix
> class. Perhaps instead of developing your own class, you could submit a
> patch adding Matrix support to DataFrame?
>
> Thanks,
> Michael
>
>
>
> On Tue, Jan 22, 2013 at 2:50 AM, Tim Yates <TYates@picr.man.ac.uk<mailto:
> TYates@picr.man.ac.uk>> wrote:
> Hi all!
>
> Is there a class that will allow me to have a Table (or DataFrame) of
> sparse Matrices?
>
> data.frame and DataFrame don't work even if I wrap the Matrix like so
>
>   DataFrame( I( Matrix( nrow=10, ncol=10, sparse=T ) ) )
>
> with the latter
>
> So does something exist that I can use?
>
> Just thought I'd check before starting out on my own :-)
>
> Cheers,
>
> Tim
> ________________________________
>
> This email is confidential and intended solely for the...{{dropped:13}}

