I am trying to remove the numbers from some column names that I have. I have tried the following without luck.
iris %>%
rename_all(.funs = list(gsub('[[:digit:]]+', "", names(.))))
How can I use rename_all to remove the numbers from the column names correctly?
Data:
data(iris)
numericNames <- paste(seq(1:5), colnames(iris), sep = "")
colnames(iris) <- numericNames