R/AllClasses.R

Defines functions MeSHDb

Documented in MeSHDb

##
## Definition of Classes
##

require("methods", quietly = TRUE)

# Reference class
.MeSHDb <- setRefClass("MeSHDb", contains="AnnotationDb")


## Constructor 
MeSHDb <- function(pkgname){

  ## Inherit class, Instantiation
  .dbconn <- RSQLite::dbConnect(
              RSQLite::SQLite(), 
              paste0(
                system.file(c("inst", "extdata"), package=pkgname),
                paste0("/", pkgname, ".sqlite")
              )
            )

  obj <- .MeSHDb$new(conn=.dbconn, packageName=pkgname)
  return(obj)
}

Try the MeSHDbi package in your browser

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

MeSHDbi documentation built on Nov. 8, 2020, 5:05 p.m.