In short: the label property of teal_module and teal_modules objects are moved from a list element to an attribute.
This will make it less of a headache to write recursive functions. Unfortunately, we will not be able to use rapply as it requires that the "bottom" class not be list-like, which teal_module is.
teal_modules is no longer a list of length 2 with label and children elements, the latter being a list of teal_module or teal_modules, but rather a list of teal_module/teal_modules objects with a label attribute. In essence, teal_modules is now what teal_modules$children was.
As a consequence, the label of a teal_module is moved to attribute accordingly.
Added function module_label for convenient extraction of the label attribute.
STATUS
Introduced core changes.
Tests pass.
There are probably places downstream that will be modified.
In short: the
label
property ofteal_module
andteal_modules
objects are moved from a list element to an attribute. This will make it less of a headache to write recursive functions. Unfortunately, we will not be able to userapply
as it requires that the "bottom" class not be list-like, whichteal_module
is.teal_modules
is no longer a list of length 2 withlabel
andchildren
elements, the latter being a list ofteal_module
orteal_modules
, but rather a list ofteal_module
/teal_modules
objects with alabel
attribute. In essence,teal_modules
is now whatteal_modules$children
was. As a consequence, thelabel
of ateal_module
is moved to attribute accordingly.Added function
module_label
for convenient extraction of thelabel
attribute.STATUS
Introduced core changes. Tests pass. There are probably places downstream that will be modified.
Conflicts with https://github.com/insightsengineering/teal/pull/1090 will be substantial.