Am 01.12.2014 um 17:49 schrieb Logan Kelly:
Sven,
I hope this is what you are asking for.
Variable names:
UR in Dunn Co WI: WIDUNN3URN UR in Washington Co WI: MNWASH5URN
I hope the second isn't really in "WI" but rather in "MN"
(Minnesota?),
otherwise the pattern wouldn't be helpful. And the number in there is
also funny.
Here is the function I have written to flatten the dataset (please do
not look too closely I have not made it very pretty yet):
Initially I was also thinking about "outfile" and "printf" and so
forth.
Now I've tackled a slightly different problem (sorry) that I've been
thinking about myself, namely how to convert "time series that are
trying to be a panel", as you said, into a proper panel. And by using
"store" and "join" I was able to avoid handcrafted temp files. So the
result is not a flat file, but a panel workfile. Nevertheless maybe it
gives you some alternative ideas, and I think it should be easier to
create a flat file from there, because now you also have an actual
string series with the country names in there.
@Allin: I was surprised I had to specify --tconv-fmt="%YQ%q" for gretl's
own exported csv file, I got an error without it.
cheers,
sven