Dear Gretl Community,

I have 100 series inside my series (a .gdt file) and I would like to delete all the series that I don't need. I know how to do this using the GUI or with the command "delete", but I would like to make it in a more automatic way.

For example, I would like to use the series 5, 8, 37 and, 98 and delete anyone else. Please take a look in this pseudo-code:

list Y = 5 8 37 98

if the variable is on the  list
    make nothing
else
    delete variable
endif

Best regards,
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge