insightsengineering / teal.slice

Reproducible slice module for teal applications
https://insightsengineering.github.io/teal.slice/
Other
11 stars 5 forks source link

[Feature Request]: Display dataset labels not names in Encoding and Filter panel #594

Open thomas-neitmann opened 1 year ago

thomas-neitmann commented 1 year ago

Feature description

I'd like the label of a dataset rather than its name (e.g. "Adverse Events" rather than "ADAE") to be displayed in the encodings and filter panel. While there is a label parameter in the cdisc_dataset() function setting it does not have the desired effect. Right now I'm abusing the name parameter for this purpose (see example below) but this does not work for ADSL and also the name cannot contain spaces.

cdisc_dataset(
  "AdverseEvents",
  adae,
  keys = get_cdisc_keys("ADAE"),
  code = paste(deparse(adae_code), collapse = "\n")
)
image


image

Code of Conduct

Contribution Guidelines

Security Policy

lcd2yyz commented 11 months ago

Is this something we can tackle along with teal.data refactor? @gogonzo @donyunardi

donyunardi commented 10 months ago

Let's put this on backlog. We'll come back once we're done with refactor.

gogonzo commented 3 months ago

Acceptance criteria: implement displaying "label" in the filter-panel as oppose to binding name

Currently to assign label to object in teal_data one has to add attribute to the binding. However this has no effect in filter-panel and anywhere futher.

teal_data() |> within({

  IRIS <- iris
  attr(IRIS, "label") <- "Edgar Anderson's Iris Data"
})