Commit 9b18cbab authored by Holger Brandl's avatar Holger Brandl

more strict column name normalization

parent b013e8e1
......@@ -214,9 +214,10 @@ rify_names <- function(df){
df
}
pretty_columns <- function(df){
pretty_columns = function(df){
names(df) <- names(df) %>%
str_replace_all("[#=.()/ -]+", "_") %>%
str_replace_all("[#=.,()/*: -]+", "_") %>%
str_replace(fixed("["), "") %>% str_replace(fixed("]"), "") %>%
str_replace("[_]+$", "") %>%
str_replace("^[_]+", "") %>%
tolower;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment