Yes, you can always copy the new series over the old after the recoding
Paolo
Il giorno gio 2 feb 2023 alle 14:19 Cottrell, Allin <cottrell(a)wfu.edu> ha
scritto:
On Thu, Feb 2, 2023 at 6:32 AM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
>
> Am 02.02.2023 um 09:45 schrieb Paolo Chirico:
>
> If I understand correctly, you can't recode the same variable, but you
can create a new variable with the same categories and a different mapping.
>
> Well, if you start out with series y and then have the recoded result in
x, you can always copy x over into y, and then you have y recoded.
Actually, no. There's a rule against overwriting an entire
string-valued series. Maybe that could be relaxed, but also it might
be nice to have a recode() function that would achieve that with
proper error-checking (the target series won't get broken). The
arguments would be a pointer-to-series and an array of strings in the
desired order.
Allin
_______________________________________________
Gretl-users mailing list -- gretl-users(a)gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave(a)gretlml.univpm.it
Website:
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/