insightsengineering / insightsengineering/teal.widgets

[Feature Request]: add data download capability for `data.frame` and `listing_df`

Open
#236 0 comments 0 reactions 0 assignees View on GitHub
core enhancement
Dominant language
R
Stars
6
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Feature description

Currently, the `table_with_settings `functionality supports download options exclusively for data types inheriting from VTableTree. It should extend this support to include the capability for downloading `listing_df` and `data.frame` objects as well.

app code: check table and no download option is availabel.
```
library(nestcolor)
library(dplyr)
library(teal.modules.clinical)

ADAE <- tmc_ex_adae
ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID)

app <- init(
data = cdisc_data(
ADSL = ADSL,
ADAE = ADAE,
code = "
ADAE <- tmc_ex_adae
ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID)
"
),
modules = modules(
tm_g_pp_adverse_events(
label = "Adverse Events",
dataname = "ADAE",
parentname = "ADSL",
patient_col = "USUBJID",
plot_height = c(600L, 200L, 2000L),
aeterm = choices_selected(
choices = variable_choices(ADAE, "AETERM"),
selected = "AETERM"
),
tox_grade = choices_selected(
choices = variable_choices(ADAE, "AETOXGR"),
selected = "AETOXGR"
),
causality = choices_selected(
choices = variable_choices(ADAE, "AEREL"),
selected = "AEREL"
),
outcome = choices_selected(
choices = variable_choices(ADAE, "AEOUT"),
selected = "AEOUT"
),
action = choices_selected(
choices = variable_choices(ADAE, "AEACN"),
selected = "AEACN"
),
time = choices_selected(
choices = variable_choices(ADAE, "ASTDY"),
selected = "ASTDY"
),
decod = NULL
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
```

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct.

### Contribution Guidelines

- [X] I agree to follow this project's Contribution Guidelines.

### Security Policy

- [X] I agree to follow this project's Security Policy.

Contributor guide

Open the contributing guide

Research direction

Start at the `table_with_settings` functionality and reproduce the provided Shiny app example, checking how download options are selected for tables. Trace the handling of `VTableTree`, `listing_df`, and `data.frame` objects, then confirm that the latter two expose a download option and that the downloaded data is usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.