I want to make a function where tidy-select is going to be called (as part of pivot_longer), and I wanted to be able to pass a string of column names to the function so that it isn't hard-coded.
For example
column<- c("c1","c2")
df %>%
pivot_longer(cols = column,...)
As far as I can tell, you can't do this because tidy-select will only take the names directly
For example
pivot_longer(df, cols = c(c1,c2),...)
Any tips on what I want to do?