Skip to content

Support pluralization #41

@DanChaltiel

Description

@DanChaltiel

Hi,

Thank you for this wonderful package.

Would it be possible to support pluralization, as introduced in the cli package with {?s}?
https://cli.r-lib.org/articles/pluralization.html

For instance, I'd like to be able to write it like this:

db_fc %>% 
  as_fc(label = "patients enrolled", text_pattern = "{N} {label}") %>%  
  fc_filter(itt == "Yes", label = "included in the ITT population", show_exc=TRUE, 
            label_exc = "patient{?s} had deviation") %>% 
  fc_draw()

Then "patient{?s} had deviation" would be "patient" or "patients" depending on {n} implicitly.

Also, this wouldn't deserve another issue, but is there a ggplot2 version of this package planned? I know about ggflowchart, but it is not as well adapted as yours.

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