R/simplify8.R

Defines functions simplify8

Documented in simplify8

#' Function to standardize the Names ####
#' 
#' @param x A string to simplify
#' @export

simplify8 <- function(x){
  x %>% 
    toupper() %>% # Make all uppercaps
    gsub("Ñ", "N",.) %>% # remove ñ
    iconv(from = "UTF-8", to = "ASCII//TRANSLIT")%>% # remove accents
    gsub(pattern = "\\s*\\([^\\)]+\\)", replacement = "", x = .) # Remove other special characters and parenthesis
}
jpablo91/Pabloverse documentation built on April 11, 2024, 2:54 p.m.