Mercurial > repos > testtool > get_geo
comparison 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 |
comparison
equal
deleted
inserted
replaced
36:a266a7c268e9 | 37:ec7a1f7f9a94 |
---|---|
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 } |