octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dataframe dereferencing


From: Jaroslav Hajek
Subject: Re: dataframe dereferencing
Date: Wed, 8 Sep 2010 07:17:31 +0200

On Tue, Sep 7, 2010 at 4:09 PM, Judd Storrs <address@hidden> wrote:
> 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

I don't think df{1:3,1:3} should return a cell array, but rather a
cs-list. Otherwise, df{1,1} should return a cell array as well.

> 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.

Maybe... but at least it would be consistent.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]