On Tue, Sep 7, 2010 at 2:10 AM, Jaroslav Hajek
<address@hidden> wrote:
Also, to access individual elements, overload {I,J} to give the
corresponding element(s) directly.
It seems like sometimes you would want to treat the dataframe as a matrix and sometimes you would want to treat it as a cell array. For example, maybe you want to call some function that works generically on cell arrays or on matrices without rewriting the functions to have special cases for dataframes.
Additionally, how does one extract a range as a matrix without specifying a type? If df{1:3,1:3} always returns a cell array and df(1:3,1:3) always returns a dataframe, I think we'd be stuck with constantly annotating types either by sometype(df(1:3,1:3)) or df(1:3,1:3).sometype which seems somewhat tedious. I suppose something like native(df(1:3,1:3)) or df(1:3,1:3).native could be used to tell dataframe not to convert types, but I think were stuck again with requiring functions to know about the dataframe interface?
--judd