Provide some tidyselect like interface for facetting
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 7k
- Forks
- 2.1k
- Avg merge
- 59m
- Merged PRs (30d)
- 2
Description
So you could do (e.g.)
diamonds |>
ggplot() |>
geom_histogram(aes(carat)) |>
facet_wrap(vars_select(starts_with("c") & !carat))
(Motivating real function: https://twitter.com/avakiai/status/1574392928545513472)
I don't think this is that useful in direct analysis but it makes certain programmatic usages possible that are otherwise very hard.
Alternatively if it was possible to make facet_wrap(vars(data.frame(vs, cyl)) work, then we could attack the problem via across()/pick() which has the advantage of working the same way as in dplyr.
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 by examining the facet_wrap() and vars() interfaces shown in the issue, along with the proposed vars_select(), across(), and pick() approaches. Compare the programmatic facetting use case with the existing behavior and determine which interface should be supported; done means a documented, tested way to select facet variables programmatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100