You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If arg in arg_match() is a character vector with more than one element (and is not a permuted version of values) the error message only mentions the first element. This is confusing if the first element is actually in values, as shown below.
fn<-function(x= c("foo", "bar")) rlang::arg_match(x)
fn(c("foo", "baz"))
#> Error in `fn()`:#> ! `x` must be one of "foo" or "bar", not "foo".
If
arg
inarg_match()
is a character vector with more than one element (and is not a permuted version ofvalues
) the error message only mentions the first element. This is confusing if the first element is actually invalues
, as shown below.Created on 2024-01-22 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: