insightsengineering / insightsengineering/teal.goshawk

In General

Open
#158 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority refactor
Dominant language
R
Stars
3
Forks
3
Avg merge
2d 6h
Merged PRs (30d)
11

Description

There are several cases across the package where variables are hard coded into the modules. would like to have this scrubbed so that there is more flexibility for example to use treatment variables other than ARM and ACTARM.

What this causes is potential disconnect between study analysis and visualizations in the app. when study analysis uses TRT01P and TRT01A treatment variables then there are cases where the values can differ for the same patient between let's say ACTARM and TRT01A.

users should be able to configure the trt_group input to include treatment variables other then ARM and ACTARM.

**Current**
```
trt_group = choices_selected(c("ARM", "ACTARM"), "ARM")
```

**Users should be able to do**
```
trt_group = choices_selected(c("TRT01P", "TRT01A"), "TRT01P"),
```

but then code like this will be troublesome. note spelling of facetting should be faceting
```
validate(need(
!facet_var %in% c("ACTARM", "ARM")[!c("ACTARM", "ARM") %in% trt_group],
sprintf("You can not choose %s as facetting variable for treatment variable %s.", facet_var, trt_group)
))
```
would be very helpful to have hard coded references to variables across the teal.goshawk package to be removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.