This is a bit of a silly question, but I cannot solve it lol.
How do I change all the column names from capital to lower case with tidyverse?
I am aware of the janitor package and I also know how do it one by one. But I am looking to do with tidyverse and for the life of me I cannot do it.
EDIT: It seems I was not completely clear. So what I want to do is to include the tolower in the pipeline, for example:
df %>% mutate(across(where(is.character), is.factor)) %>% tolower(colnames())
And it doesnt work...
Sample data frame:
testando <- structure(list(BRANCH = structure(1:3, .Label = c("A", "B", "C" ), class = "factor"), CITY = structure(c(2L, 2L, 1L), .Label = c("Naypyitaw", "Yangon"), class = "factor"), GENDER = structure(c(2L, 2L, 1L ), .Label = c("Female", "Male"), class = "factor"), DATE = structure(c(17901, 17958, 17963), class = "Date"), RATING = c(9.1, 9.7, 9.6)), class = "data.frame", row.names = c(NA, -3L))