Sry again, I got it from the homepage (sourceforge) by selecting the "last
snapshot" and now it works (I used the updating prior...).
Here is the working example for the copy:
___
clear
nulldata 100
setobs 1 1 --cross-section
series somethingelse = uniform()
series Utility_min = normal()
series Utility_max = normal()+1
series Utility_avg = (Utility_min + Utility_max)/2
list alls = dataset
loop foreach i alls
string new = strsub(varname($i), "Utility", "U")
catch rename $i @new
endloop
___
Many thanks to all of you!
-----Ursprüngliche Nachricht-----
Von: gretl-devel-bounces(a)lists.wfu.edu [mailto:gretl-devel-
bounces(a)lists.wfu.edu] Im Auftrag von Artur Tarassow
Gesendet: Mittwoch, 1. März 2017 09:29
An: Gretl development <gretl-devel(a)lists.wfu.edu>
Betreff: Re: [Gretl-devel] Variable names in summary statistics (and similar)
A couple of days ago this was changed:
"Now varname() accepts either an ID number or a series itself."
Are you using the latest cvs/git version?
Artur
Am 01.03.2017 um 09:25 schrieb Schaff, Frederik:
>> How about the "rename" command? ;)
>>
>>
> That I should have seen by myself... thanks! And there I see "strsub",
which shall do the job if I can get the name of a variable...
>
> Ok, so the following would be nice:
>
> list alls = dataset
> loop foreach i alls
> string new = strsub(varname($i), "Utility", "U")
> rename $i new
> endloop
>
> but it does not work, because varname (in my version) still needs an ID.
When will the recent updated that fixes this be pushed? I am using
windows...
>
> Many thanks!
>
> _______________________________________________
> Gretl-devel mailing list
> Gretl-devel(a)lists.wfu.edu
>
http://lists.wfu.edu/mailman/listinfo/gretl-devel
>
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel