Error changing the order of levels in a dataframe column

Use @transform! or just do Data.expectations = categorical(Data.expectations, ordered=true) instead.

@transform allocates a fresh data frame.

2 Likes