diff --git a/R/core_commons.R b/R/core_commons.R index a173bdc658d09a17e69a306af80348d75067cbb9..e32ec52b67194a836fb14d966c634e8e89e4b65e 100644 --- a/R/core_commons.R +++ b/R/core_commons.R @@ -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;