R/wb_info_split.R

Defines functions wb_info_split

Documented in wb_info_split

#' wb_info_split
#'
#' @param x list of package dependencies
#'
#'
wb_info_split <-
  function(x){
    tryCatch(
      expr =
        {
          x <- unlist(strsplit(x, ",[ \n]*"))
          x <- gsub(x = x, pattern = " *\\(.*$", replacement = "")
        },
      error =
        function(e){
          x <<- character(0)
        }
    )
    # return
    x
  }
petermeissner/wayback documentation built on Oct. 3, 2020, 6:01 a.m.