[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Data frames ?
From: |
depuis |
Subject: |
Data frames ? |
Date: |
Fri, 26 Oct 2007 09:22:41 +0200 |
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
---
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
http://www.scarlet.be/