pharmaverse / pharmaverse/rtables
NULL always passed to vals, labels arguments of preprocessing functions used in make_split_fun
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 260
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
the make_split_fun documentation says that vals and labels are mandatory arguments for preprocessing functions, and they are, as (unlike .spl_context they are unconditionally passed to the function by do_split, which invokes the split function).
The issue is that none of the calls to do_split actually specify these arguments, which means that they are always the default, which is NULL for both vals and labels.
We should probably remove these arguments to simplify the (already fairly complex) process of creating custom split functions.
Not required for upcoming/in-process 0.6.13 release
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the make_split_fun documentation and the do_split calls mentioned in the issue, then inspect how .spl_context is handled for comparison. Confirm whether vals and labels are unused beyond being passed as NULL, and update the relevant API documentation and call sites so custom split functions no longer require them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100