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

Checking the inputs of your R functions - R-hub blog #157

Open
utterances-bot opened this issue Sep 5, 2022 · 1 comment
Open

Checking the inputs of your R functions - R-hub blog #157

utterances-bot opened this issue Sep 5, 2022 · 1 comment

Comments

@utterances-bot
Copy link

Checking the inputs of your R functions - R-hub blog

https://blog.r-hub.io/2022/03/10/input-checking/

Copy link

uriahf commented Sep 5, 2022

Extremely useful post!

I wanted to use match.arg() for my functions but I was disappointed to find out that the function uses partial matching unlike rlang::arg_match()

# match.arg will not trigger an error

match.arg(arg = "p", choices = c("R", "python"))

# rlang::arg_match0 will trigger an error

rlang::arg_match0(arg = "p", choices = c("R", "python"))

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

2 participants