R/getDataSource.R

Defines functions getDataSource

Documented in getDataSource

getDataSource <- function(name=NA, code=NA){
  datasource = NULL
  if (!is.na(name)) {
    datasource <- .jcall(
     "org/bridgedb/DataSource",
     "Lorg/bridgedb/DataSource;",
     "getExistingByFullName",name
    )
  } else if (!is.na(code)) {
    datasource <- .jcall(
     "org/bridgedb/DataSource",
     "Lorg/bridgedb/DataSource;",
     "getExistingBySystemCode",code
    )
  } else {
    stop("You must provide either a name or a system code")
  }
   datasource
}

Try the BridgeDbR package in your browser

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

BridgeDbR documentation built on Nov. 8, 2020, 5:09 p.m.