octave-maintainers
[Top][All Lists]
Advanced

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

Re: Data frames ?


From: David Bateman
Subject: Re: Data frames ?
Date: Mon, 29 Oct 2007 10:19:00 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

depuis wrote:
> Hello,
>
> I recently dived into code I wrote a few months ago ... and had a hard time
> remembering what contained a matrix.
>
> A possible solution to this kind of annoyance would be to implement something
> similar to R "data frames". Such object is a matrix where lines and columns
> have associated name. This way, matrix would be self-documented. This would
> also help reading data headers, i.e. column names
>
> Coding implications:
> 1) modify the basic matrix object
> 2) modify the print and display routines
> 3) at the user level : either follow the R paradigm: df$var is the column
> named 'var' of the df data frame, or define some function : x = getcol(df,
> "var") returning the column named "var" of df. Define also functions similar
> to fieldnames: colnames & linenames
>
> What do you think about it ? 
>
> Pascal Dupuis
> ---
>
>   

This would be fairly trivial to add as it would just be a derived class
of the basic matrix class, and all the basic matrix operators could take
precedence.. However, in that case the dimensions of the matrix would
loose their names during a function or operator, is this what you want?
Or do the dimensions have to have the same name to allow the function or
operator to be completed.. If the first case is ok, then the triangular
type in Octave-forge is a good example of how to implement this quite
trivially.

D.



-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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