insightsengineering / insightsengineering/crane
`modify_split_caption` does not work when `tbl_listing` is empty
- 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
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