Hello,
this time no bug report but a feature request.
I think there is a pretty obvious feature that's missing and that's
enabling conversion from matrices to lists, to facilitate roundtripping
list - matrix - list. What I have in mind is something like this workaround:
<hansl>
function list mat2list(matrix inmat)
list lout = null # initialize
loop i=1..cols(inmat)
series stemp = inmat[,i]
list lout += stemp
endloop
return lout
end function
</hansl>
For the direction list-to-matrix we have the wonderful {} syntax, and
section 15.9 describes how to do matrix-to-series. So why not
matrix-to-list?
The thing is that currently lists and matrices in gretl are
complementary; you cannot use matrices in estimation commands for
example, and you cannot apply many calculations to lists. So I think we
need to ensure quick and easy conversion from one type to the other.
In terms of syntax, I wouldn't mind an explicit function like mat2list()
above, to be built-in. What do you think?
thanks,
sven