index(pedestrian)
index_var(pedestrian)
# Use as a tidyselect helper
library(dplyr)
tourism %>% select(index_var(), key_vars())
# Use with relocate
tourism %>% relocate(index_var(), .after = key_vars())
Run the code above in your browser using DataLab