R/database.R

#' Database info queries
#'
#' Return the name and version number of current database.
#' @return a dataframe.
#' @seealso \href{http://www.reactome.org}{\code{Reactome}}
#'
#' @export
#' @rdname database

rtDatabase <- function(){
  url = 'http://www.reactome.org/ContentService/data/database/'
  tmp = lapply(c('name', 'version'),
              function(str) content(GET(paste(url, str, sep = ''))))
  dt = data.frame(name = tmp[[1]], version = tmp[[2]], stringsAsFactors = F)
  cat(str_c(dt$name, '\n', dt$version))
}
VonWebEinstein/ReactomeAPI documentation built on May 9, 2019, 10:02 p.m.