Mercurial > repos > testtool > get_geo
diff TxDb.Hsapiens.UCSC.hg19.knownGene/R/zzz.R @ 37:ec7a1f7f9a94 draft
Uploaded
author | testtool |
---|---|
date | Thu, 09 Feb 2017 16:24:15 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TxDb.Hsapiens.UCSC.hg19.knownGene/R/zzz.R Thu Feb 09 16:24:15 2017 -0500 @@ -0,0 +1,17 @@ +### +### Load any db objects whenever the package is loaded. +### + +.onLoad <- function(libname, pkgname) +{ + ns <- asNamespace(pkgname) + path <- system.file("extdata", package=pkgname, lib.loc=libname) + files <- dir(path) + for(i in seq_len(length(files))){ + db <- loadDb(system.file("extdata", files[[i]], package=pkgname, + lib.loc=libname),packageName=pkgname) + objname <- sub(".sqlite$","",files[[i]]) + assign(objname, db, envir=ns) + namespaceExport(ns, objname) + } +}