R/str2vec.R

Defines functions str2vec

Documented in str2vec

#' array-ify a string with a possible leading path/URL/whatever
#'
#' @param x   a string
#' @param y   a split character (default is " ")
#' 
#' @return    the array produced by splitting basename(x) on y
#'
#' @export
str2vec <- function(x, y=" ") {
  strsplit(basename(x), y)[[1]]
}
arcolombo/TxDbLite documentation built on July 10, 2020, 12:27 a.m.