vetr
vetr copied to clipboard
Substituting Arg When Combining `.` and Diff Arg Name
fun2 <- function(x, y)
validate_args(
x=integer(),
y=character() && length(x) == length(.)
)
fun2(1:3, letters[1:4])
## Error in fun2(x = 1:3, y = letters[1:4]) :
## For argument `y`, `length(x) == length(letters[1:4])` is not TRUE (FALSE)
Would be nice if x
was also subbed so the above is consistent? As it is this is almost worse than:
length(x) == length(y)