-
Notifications
You must be signed in to change notification settings - Fork 979
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
Allow use of patterns in setnames when new is a function #3918
Comments
I put together a first try for behavior 1 above here. One question is whether |
@smingerson I think returning gracefully will be better |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Allow the use of
setnames(old = patterns(...), new = renaming_function)
Similar to #3703, this makes
setnames()
even more convenient to use.One question with this is how
patterns()
would be used insetnames()
. The two options that sprang to my mind:setnames()
operates similar tomelt()
, where multiple patterns can be provided to match different names given in the value.name argument. The first pattern would match the first in a list of functions passed to new, and so on. If only one function was passed, the list would be concatenated or error, depending on preference.The text was updated successfully, but these errors were encountered: