How can I deselect columns given in the ...
argument of a self written function. (I also need to select the columns at another point, so just specifying the columns with -
in ...
does not solve my problem.)
Any soltions are apreciated, select
-helpers, manipulating quosures
or expressions, ...
# very simple example data
test <- data.frame(a=1:3, b=1:3, c=1:3)
# function skeleton
testfun <- function(x, ...){
y <- select(x, ...)
z <- select(x, -...) # does of course not work like this
return(list(y, z)) # just as an example
}
# calling the function to select different columns
testfun(test, a)
testfun(test, a, b)