I'm wanting to use janitor::clean_names() on only some of my column names in my data frame.
iris %>%
janitor::clean_names()
The above cleans all column names.
I've tried using below to just clean the first 2 column names
iris %>%
janitor::make_clean_names(1:2)
and
iris %>%
janitor::clean_names(.[,1:2])
but had no luck.
This doesn't seem to be something the function itself supports, but you can write your own helper function