Normally with dplyr/tidyr, I can achieve exclusions with negation
... %>% gather(x, -y)
However, currently, I want some variables to be specified programmatically and be an exclusion, so ideally
... %>% gather_(xVar, -yVar)
where xVar and yVar are character variables (say, with values 'x' and 'y').
Are exclusions simply disallowed with the string versions of functions, or is there a way to do them?
Both of the obvious culprits -yVar
and paste0('-', yVar)
seem to produce errors.