insightsengineering / insightsengineering/crane

`modify_split_caption` does not work when `tbl_listing` is empty

Open
#318 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
15
Forks
7
Avg merge
6d 9h
Merged PRs (30d)
5

Description

This renders an output with no subtitle for treatments.
```
gts_ael02 <- df_ael02 |>
crane::tbl_listing() |>
modify_split_caption(spl_col = "TRT01A", pattern = "Treatment: {spl_level}")
```

Updateing `tbl_listing` as follows `crane::tbl_listing(split_by_rows = list(variable_level = "TRT01A")) ` fixes the issue.

Contributor guide

Open the contributing guide

Research direction

Reproduce the pipeline using tbl_listing() with no split_by_rows and then with variable_level set to TRT01A, focusing on how modify_split_caption() handles the empty table listing. Trace these two entry points and verify that the treatment subtitle is rendered for the first case without breaking the working case.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.