klmr / klmr/box

Allow tidyselect-like syntax within `use()`

Open
#319 2 comments 2 reactions 0 assignees View on GitHub
✨ new feature
Dominant language
R
Stars
979
Forks
49
PR merge metrics
No merged PRs in 30d

Description

This could be seen as an extension of #287.

E.g. `use(purrr[contains("map")])` would import `map()`, `imap()`, `map_chr()`, `map_dbl()` etc. Another common pattern might be `use(ggplot2[ggplot, aes, starts_with("geom_")])`. In my opinion this would do a lot for readability/convenience, and would lend familiarity for those who already use the tidyverse.

The only possible issue I can see is that tidyselect would use `everything()` rather than `...` to import the whole namespace. I suppose supporting both might be possible, but perhaps not very neat.

Contributor guide

Open the contributing guide

Research direction

Start by reading issue #287 and the current use() behavior. Work out the intended semantics for tidyselect-like brackets, including how contains(), starts_with(), ..., and everything() should behave. Done means the purrr and ggplot2 examples select the expected exports with documented, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.