Skip to content

Proposal for a new label_fun argument for split functions #1115

Description

@wwojciech

Hi @gmbecker ,

I’d like to propose adding a new argument (say, label_fun) to split_rows*() / split_cols*().

The idea would be to allow users to provide a function that changes/formats the levels of the split variable. For example, suppose we have a SEX variable in the dataset with levels MALE and FEMALE, but we want the split labels to appear as Male and Female instead.

With this argument, I could simply specify:

label_fun = junco::string_to_title

and that would be it. I think transformations like string_to_title() are very common when formatting labels, so this would be a convenient way to handle this without having to modify the dataset itself.

Please consider it. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions