R/get.name.R

Defines functions get.name

Documented in get.name

#' get.name 
#'
#' Get KEGG object names from its API. 
#' @param x KEGG code. 
#' @return character name. 
#'
#' @export

get.name <-
function(x){
        inf <- readLines(paste("http://rest.kegg.jp/get/", x, sep=""))
        coord <- grep("NAME", inf) 
        name <- gsub("^NAME\\s+|;","",inf[coord])  
        return(name)
}
rsilvabioinfo/ProbMetab documentation built on May 28, 2019, 3:32 a.m.