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