R/grep_tid.R

Defines functions grep_tid

Documented in grep_tid

#' Greps the tid from the given identifier string
#'
#' @param id Given identifier string
#' @return tid string
#' @export
#' @examples
#' grep_tid("ti|700015|org|Coriobacterium_glomerans_PW2")

grep_tid <- function(id) {
    tid <- strsplit(id, "\\|")
    tid <- vapply(tid, function(x) x[2], "test")
    return(tid)
}
hiplot/animalcules documentation built on March 1, 2021, 12:04 a.m.