Am 19.02.2021 um 13:52 schrieb Allin Cottrell:
On Fri, 19 Feb 2021, Riccardo (Jack) Lucchetti wrote:
> My question is: is there a simpler way to accomplish the above?
And if
> there isn't, would it be worthwhile to add this function to the extra
> package?
I can't think of an easier way of doing this, and your function seems to
me a good candidate for "extra". One possible modification would be:
function matrix unstack(series x, series names[null], \
strings S[null])
where the caller needs to supply one of @names or @S, allowing for the
possibility that there's no handy series holding group names and you
therefore want to submit an array of group names directly. Or, drop the
@S argument but be ready to construct automatic names (e.g. "unit%d") in
case @names is not given.
Jack, would you take care of pushing this into 'extra', or is further
discussion needed?
thanks
sven