inst/rmarkdown/templates/clinicopathological/skeleton/R/cleanSurgPathNo.R

cleanSurgPathNo <- 
    . %>% 
    trimws() %>% 
    gsub(pattern = "[a-zA-Z]",
         replacement = "",
         x = .
         ) %>% 
    gsub(pattern = "-",
         replacement = " ",
         x = .
         ) %>% 
    substr(x = .,
           start = 1,
           stop = 8
           )
sbalci/histopathR documentation built on Nov. 12, 2024, 12:28 p.m.