It seems to me that in assign we save a named vector instead of atomic value. Luckily the getter functionality (i.e. var_label) handling this correctly but there might be other getters not that smart -> https://github.com/insightsengineering/teal.data/pull/301
In a simple terms:
var_label(x) <- var_label(x)
should not modifyx
if it has non-empty labels for all cols. That's not true right now:Created on 2024-02-27 with reprex v2.1.0
Let's analyse why:
Created on 2024-02-27 with reprex v2.1.0
It seems to me that in assign we save a named vector instead of atomic value. Luckily the getter functionality (i.e.
var_label
) handling this correctly but there might be other getters not that smart -> https://github.com/insightsengineering/teal.data/pull/301Please make a good test case against it.