[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rewrite of structs - advice sought
From: |
fork |
Subject: |
Re: rewrite of structs - advice sought |
Date: |
Wed, 23 Jun 2010 17:33:00 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
> May I suggest enhancing the
> | basic load and save operation, implementing something similar to R data
> | frame, which are:
> | A data frame, a matrix-like structure whose columns may be of differing
> | types (numeric, logical, factor and character and so on).
> |
> | Basically, load and save should try to return a structure array in case of a
> | first non-comment line of fields name, a matrix if all values are of similar
> | types, and an error code otherwise ?
(this should be a different thread if we really want to pursue it)
data.frames (and smart categorical data handling) are some of the few things I
miss about R. It is really nice to be able to write
data[10:15, 'colname']
and get something reasonable.
> Feel free to enter a feature request in the bug tracker, but please
> remember that Octave is developed by volunteers and you may have to
> provide some additional incentive to get someone interested in working
> on a particular project.
If there were a well designed data.frame-ish idea, I think it would be fairly
easy (as in 100 lines or so) to write an m-function to handle the OP's basic
idea for importing. We have scanf and split functions...
> Also, we have compatibility with Matlab (not R) to consider. Perhaps
> it would be best if someone were to write a function for Octave that
> is compatible with Matlab's importdata function.
While this would be cool, it wouldn't address the issue of different column
types or column names. Unless I am misreading the online docs.
And I personally think sophisticated data-handling would be a good reason to
allow non-TMW based functions and protocols. I am all for Octave being a strict
superset of matlab, and in this case there is no good matlab approach.
My rather vague $0.02
Re: rewrite of structs - advice sought, CdeMills, 2010/06/23