Defines functions clear_rut

Documented in clear_rut

#' Clear RUT
#' @description Removes any character that is not a number, K, k, dot or hyphen
#' @param rut Character string
#' @return Returns a character string without said characters
#' @examples
#' clear_rut('12m345.678-9=')
#' @keywords clean
clear_rut <- function(rut) {
  rut <- gsub('[^0-9Kk|\\.&-]', '', rut)

Try the rutifier package in your browser

Any scripts or data that you put into this service are public.

rutifier documentation built on March 2, 2020, 5:09 p.m.