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)
}

Try the animalcules package in your browser

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

animalcules documentation built on Nov. 8, 2020, 6:47 p.m.