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

Partial argument matching in rep() #81

Closed
joshwlambert opened this issue Nov 9, 2023 · 0 comments · Fixed by #82
Closed

Partial argument matching in rep() #81

joshwlambert opened this issue Nov 9, 2023 · 0 comments · Fixed by #82

Comments

@joshwlambert
Copy link
Contributor

First and foremost, just to say that I really like the {randomNames} R package. It has been really useful for a package we're developing in the Epiverse-TRACE intiative: {simulist}.

Within that package we use a testing setup option that automatically checks whether we are using partial argument matching (i.e. only matching some of the argument name within a function which is then matched to the full argument name by R). This check also picks up if dependencies used within the package are using partial argument matching, and it has detected some in {randomNames}.

Specifically, the rep() function, where currently, length is being used and partially matched to length.out. It would be great if this could be updated to avoid partial matching. I've added some links at the bottom of this issue to why using partial matching can make code brittle.

I'm happy to make a PR from a fork of the package to make the recommended changes.

Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant