On Thu, 5 Feb 2015, Henrique Andrade wrote:
Dear Gretl Community,
I need to retrieve a name of a specific element from a list and use it as a
string. I tried the following commands:
<hansl code>
open australia.gdt
list L = PAU PUS E
string S = varname(varnum(L[2]))
</hansl code>
As an argument for varname(), you need the numerical value of
the given element of L (the series index number). You can get that by
turning L into a matrix (in effect, a vector of integers):
matrix m = L
string S = varname(m[2])
Allin Cottrell