Am 11.01.2015 um 19:27 schrieb Allin Cottrell:
On Sun, 11 Jan 2015, Sven Schreiber wrote:
Like Jack, I'm a bit skeptical about adding this as a built-in,
partly
because I suspect it should be up to the user to decide how to name
the resulting series. However, it can be done quite efficiently via a
user-defined function, particular after I've fixed a little issue with
genseries():
I don't have anything against adding functionality via function
(packages). Perhaps a kind of "utilities" package could actually be
useful that contains a collection of smallish functions like this one.
Then you would just need to remember to do "include utilitites.gfn" at
the top.
Also, yes as I said I agree it should be possible for the user to
specify the names. Just provide an array of strings or somesuch as a
second argument: "list outlist = mat2list(inlist, snames)". Then we
could discuss whether that could become optional with some default. But
I don't see a deep issue here.
OK, let's do so ;-) IMO, while working with a dataset, series and
lists is often very convenient,
...
(Nor do I feel constrained by list limitations when
working with a dataset.)
Partly this depends on what you want to do. For example, specifying an
equation system is only possible via special list constructions (AFAIK).
And if the variables that you want to specify there are not straight in
your dataset already, chances are that you cook them together via matrix
operations, because of the list limitations. I think there are other
examples as well.
But there is a broader point IMHO: If you have a non-trivial task, you
often want to or should split your code into modular functions. And
because then some of your functions expect a list argument as input,
some other preparatory functions would need to return lists as output.
And this is currently not as easy as it could be.
I guess my bottom line is, if lists are supposed to be first-class
objects, stuff like this little conversion function would be good IMHO.
But if the motto somehow is that one should just accept the list
limitations, then I would like to be able to actually avoid lists more
than is currently possible. This would involve changes or additions in
other areas, see my example regarding equation systems.
thanks,
sven