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 of them.

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
    endif
endloop

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!
Yago