R/cleanSurgPathNo.R

cleanSurgPathNo <- 
    . %>% 
    trimws() %>% 
    gsub(pattern = "[a-zA-Z]",
         replacement = "",
         x = .
         ) %>% 
    gsub(pattern = "-",
         replacement = " ",
         x = .
         ) %>% 
    substr(x = .,
           start = 1,
           stop = 8
           )
sbalci/histopathology-template documentation built on June 29, 2023, 5:52 a.m.