Is there any documentation on how to implement tidyverse's solution to select all but specific variables using -/! before unquoted vectors in selection verbs?
For example:
tibble(x = 1, y = 2, z = 3) |> select(-c(x, z))
I'd be interested in implementing that feature in some functions of my package. I've had a look at tidyselect source code but that's a fair bit of code to scan. I feel like the magic happen inside the data mask but any hint would be welcome.
I was wondering how they do to handle these operators from expressions. I assume they parse the expression and process the data differently depending on the operator but I can't find it in the code. I was curious to see how they do it. It seems to happen inside tidyselect:::vars_select_eval() and probably inside the data_mask object coded in C.