R/remove_brackets.R

Defines functions remove_brackets

Documented in remove_brackets

#' @title Remove Text in Brackets
#' @description Uses string R to replace text in brackets
#' @param x A vector or column in a data frame
#'
#' @return x A vector or data frame column
#' @export
#' @importFrom stringr str_replace
#' @examples \dontrun{stringr::str_replace(doubtful$scientificname, " \\(.*\\)", "")}
remove_brackets <- function(x){
  x <- stringr::str_replace(x, " \\(.*\\)", "")
}
poldham/oldhammisc documentation built on May 25, 2019, 11:23 a.m.