One of my in-progress functions calls grep() with value = TRUE hard-coded. I\'d like to pass all of the further arguments except <
One way is to just make value a named parameter but ignore the input - that way it will never be a part of the dots to begin with.
f <- function(pattern, x, value = "hahaThisGetsIgnored", ...){
grep(pattern, x, value = TRUE, ...)
}
You can also use the idea in the answer @MatthewLundberg gave but by doing the argument manipulation without Curry so you don't need the functional package
f <- function(pattern, x, ...){
dots <- list(...)
# Remove value from the dots list if it is there
dots$value <- NULL
args <- c(list(pattern = pattern, x = x, value = TRUE), dots)
do.call(grep, args)
}