R/get_num_seq.R

Defines functions get_num_seq

Documented in get_num_seq

#' Extract a Sequence of Numbers from Text
#'
#' Extract a Sequence of Numbers from Text.
#'
#' @param xx text string / vector
#' @export
get_num_seq <- function(xx){
  y <- strsplit(
    gsub("[[:punct:]]","", xx)
          , " ")[[1]]
  y[grep('[0-9]', y)]
}
data-steve/kleentex documentation built on May 12, 2017, 5:41 p.m.