Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use NSE for pick() input, assign var in current env? #1

Open
markheckmann opened this issue Oct 19, 2024 · 0 comments
Open

feat: use NSE for pick() input, assign var in current env? #1

markheckmann opened this issue Oct 19, 2024 · 0 comments

Comments

@markheckmann
Copy link
Owner

markheckmann commented Oct 19, 2024

1. Use NSE

Currently, one has to pass a string with the object name:

pick("name")

It would be nice to also use NSE like in pack. Then the following would be equivalent.

pick(name)

To allow passing variables containing the name, rlang/dplyr syntax could be implemented.

2. Short form

Currently, one has to use pick() as follows to save it to an object.

name <- pick("name")

In most cases, pick is used interactively. We might consider an additional function pick2() (or similar) as a shortcut to assign an object with the same name automatically to the current env. Then, the following lines would be equivalent.

name <- pick("name")
pick2("name")

And with additional NSE

pick2(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant