Mercurial > repos > testtool > get_geo
annotate TxDb.Hsapiens.UCSC.hg19.knownGene/R/zzz.R @ 39:5447fc8946ed draft default tip
Uploaded
author | testtool |
---|---|
date | Fri, 13 Oct 2017 11:22:49 -0400 |
parents | ec7a1f7f9a94 |
children |
rev | line source |
---|---|
37 | 1 ### |
2 ### Load any db objects whenever the package is loaded. | |
3 ### | |
4 | |
5 .onLoad <- function(libname, pkgname) | |
6 { | |
7 ns <- asNamespace(pkgname) | |
8 path <- system.file("extdata", package=pkgname, lib.loc=libname) | |
9 files <- dir(path) | |
10 for(i in seq_len(length(files))){ | |
11 db <- loadDb(system.file("extdata", files[[i]], package=pkgname, | |
12 lib.loc=libname),packageName=pkgname) | |
13 objname <- sub(".sqlite$","",files[[i]]) | |
14 assign(objname, db, envir=ns) | |
15 namespaceExport(ns, objname) | |
16 } | |
17 } |