That actually worked, I didn't thought it like that, thank you so much!
De: Artur Bala <artur.bala.tn(a)gmail.com>
Enviado: lunes, 22 de marzo de 2021 12:59
Para: Gretl list <gretl-users(a)gretlml.univpm.it>
Asunto: [Gretl-users] Re: Deleting values in a dataset (data transformation)
What about restricting the sample and make the changes like this:
smpl RowNumber > 0 --restrict
Or another way (more compact)
Exited = (RowNumber > 0)? NA; Exited
Le lun. 22 mars 2021 à 13:51, Iago Varela
<firstname.lastname@example.org<mailto:email@example.com>> a écrit :
Hi, I'm Yago, new to gretl.
My question is the following:
I have a dataset with 11k observations.
I have a bunch of "series", being 'RowNumber' and 'Exited' two
I basically want to set 'Exited' values to 'Null' (or the Gretl
equivalent) where 'RowNumber' > 10000
I've been trying with the Gretl documentation to figure out how to do this, but apart
for being an absolute beginner at programing, it appears that foreach loops can't be
used with series, or that's what the console says.
I figured out that my 'pseudocode' would be something like:
loop foreach RowNumber Exited
if RowNumber > 10000
Exited = Null
I've been trying for a couple days, also emulating Foreach loops from other languages,
unsuccesfully, hope someone can explain this to me. It's probably something dumb
I'm missing out.
Thank you for your time!
Gretl-users mailing list --
To unsubscribe send an email to