insightsengineering / teal.modules.general

General Purpose Teal Modules
https://insightsengineering.github.io/teal.modules.general/
Other
9 stars 13 forks source link

Strata `NA` in `distribution` module #373

Open nikolas-burkoff opened 2 years ago

nikolas-burkoff commented 2 years ago

From https://github.com/insightsengineering/coredev-tasks/issues/343

See e.g. the 2nd roxygen example:

image

The NA here is not NA = missing but NA = one of the strata that is not selected.

I would have expected filtering by strata would completely remove those stratas we are not interested in?

donyunardi commented 1 year ago

Acceptance Criteria

NOTE: For dev that's picking this up, please see show R code to see how the visualization is generated. This will help during development.

lcd2yyz commented 1 year ago

Looks to be a bug in the plotting module, possibly due to some issues with relevel/recoding of factors during data processing before entering ggplot. NA should not appear in the visualization/legend, as it is not part of the selected categorical values. Not expecting to see NA in the items to be selected either, as it was not part of the input data.

donyunardi commented 1 year ago

Thanks @lcd2yyz! I updated the criteria and we'll bring this up to the team again.