nhs-r-community / NHSRplotthedots

An SPC package to support NHSE/I 'Making Data Count' programme
https://nhs-r-community.github.io/NHSRplotthedots/
Other
48 stars 23 forks source link

Implement faceting by two variables #207

Open ThomUK opened 5 months ago

ThomUK commented 5 months ago

The current implementation of faceting accepts only one column name, and faceting is implemented using facet_wrap.

It would be convenient to be able to facet by two columns, and to implement using facet_grid instead.

This could be via:

  1. Changes to the main ptd_spc function
  2. Addition of a convenience wrapper function which makes unfaceted calls to ptd_spc, and then arranges the resulting plots using eg. {cowplot} or {patchwork}.

This issue is low priority because it's possible to do this manually either with cowplot or patchwork with a little effort. Raising an issue mainly because I needed it today, and to log the possible addition of functionality.

Lextuga007 commented 1 month ago

How did you resolve this? Perhaps it could be listed as a vignette as added functionality along with other packages.