insightsengineering / insightsengineering/teal.picks

[Feature Request]: Option to preserve all columns when merging `teal.picks` selections

Open
#99 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
R
Stars
4
Forks
0
Avg merge
6d 11h
Merged PRs (30d)
3

Description

### Feature description

Currently, when using `teal.picks` together with static parameters that require additional variables, we encounter a limitation: the merged dataset retains only the variables explicitly selected through `teal.picks`. This makes it difficult to support modules that rely on additional columns.

## Use case

Consider a module with an interface such as:

```r
foo(by, include = tidyselect::everything())
```

In this scenario, `by` may be provided via `teal.picks`, while `include` defaults to all variables. With the current implementation, supporting this pattern requires both arguments to be represented as `teal.picks` selections and then merged. However, the merged result only contains the selected variables, rather than preserving the full dataset.

## Feature request

It would be useful to provide an option for merged `teal.picks` selections to retain all columns from the underlying dataset, while still honoring the selected variables for the relevant arguments.

This would simplify support for modules that combine dynamic variable selection with static parameters requiring access to the complete dataset, without forcing all parameters to be expressed as `teal.picks`.

### 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 by locating the teal.picks selection-merging entry point and its existing tests. Trace how selected variables are retained, then define and verify an option that preserves all underlying dataset columns while still honoring selections for relevant arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.