R/text_delete.R

Defines functions text_delete

Documented in text_delete

library(dplyr)
library(stringr)

text_delete <- function(df, removewords){
  df <- df %>%
  mutate(text = str_remove_all(text, regex(str_c("\\b",removewords, "\\b", collapse = '|'), ignore_case = T)))

  return(df)
}
BeaJJ/ComTxt documentation built on Dec. 17, 2021, 10:46 a.m.