R/remove-punctuation.R

Defines functions remove_punctuation

Documented in remove_punctuation

#' Remove Punctuation From String
#'
#' @param string string to remove punctuation from
#'
#' @return string with punctuation removed, only letters and whitespace will remain
#' @export
#'
#' @examples
#' remove_punctuation("4534dog 4328hello")
remove_punctuation <- function(string) {
  gsub("[^[:alpha:][:space:]]*", "", string)
}
kadekillary/killaryr documentation built on Dec. 11, 2019, 3:36 p.m.