{"action":"created","issue":{"url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/27","repository_url":"https://api.github.com/repos/RamsinghLab/TxDbLite","labels_url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/27/comments","events_url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/27/events","html_url":"https://github.com/RamsinghLab/TxDbLite/issues/27","id":172217137,"number":27,"title":"onLoad  sealed namespace issue","user":{"login":"arcolombo","id":5473099,"avatar_url":"https://avatars.githubusercontent.com/u/5473099?v=3","gravatar_id":"","url":"https://api.github.com/users/arcolombo","html_url":"https://github.com/arcolombo","followers_url":"https://api.github.com/users/arcolombo/followers","following_url":"https://api.github.com/users/arcolombo/following{/other_user}","gists_url":"https://api.github.com/users/arcolombo/gists{/gist_id}","starred_url":"https://api.github.com/users/arcolombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcolombo/subscriptions","organizations_url":"https://api.github.com/users/arcolombo/orgs","repos_url":"https://api.github.com/users/arcolombo/repos","events_url":"https://api.github.com/users/arcolombo/events{/privacy}","received_events_url":"https://api.github.com/users/arcolombo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-19T20:46:38Z","updated_at":"2016-08-19T20:53:48Z","closed_at":null,"body":"hi so the namespace is sealed once a package is loaded.  so the onLoad function that loads a TxDbLite db into the namespace is not feasible (?)\r\n\r\n##\r\n.onLoad <- function(libname, pkgname)\r\n{\r\n  ns <- asNamespace(pkgname)\r\n  path <- system.file(\"extdata\", package=pkgname)\r\n#  path <- system.file(\"extdata\", package=pkgname, lib.loc=libname)\r\n  files <- dir(path)\r\n  for(i in seq_len(length(files))){\r\n   # db <- EnsDbLite(system.file(\"extdata\", files[[i]], package=pkgname,\r\n    #                lib.loc=libname))\r\n    db<-EnsDbLite(files[[i]],path)\r\n    objname <- sub(\".sqlite$\",\"\",files[[i]])\r\n    unlockBinding(db,ns)\r\n    assign(objname, db, envir=ns)\r\n    namespaceExport(ns, objname)\r\n  }\r\n}\r\n\r\n\r\n\r\nERROR error in namespaceExport(ns, objname) : \r\n  cannot add to exports of a sealed namespace\r\n\r\nso I'm not sure how we were able to load a DB on package loading previously (?)\r\n"},"comment":{"url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/comments/241132376","html_url":"https://github.com/RamsinghLab/TxDbLite/issues/27#issuecomment-241132376","issue_url":"https://api.github.com/repos/RamsinghLab/TxDbLite/issues/27","id":241132376,"user":{"login":"ttriche","id":4386,"avatar_url":"https://avatars.githubusercontent.com/u/4386?v=3","gravatar_id":"","url":"https://api.github.com/users/ttriche","html_url":"https://github.com/ttriche","followers_url":"https://api.github.com/users/ttriche/followers","following_url":"https://api.github.com/users/ttriche/following{/other_user}","gists_url":"https://api.github.com/users/ttriche/gists{/gist_id}","starred_url":"https://api.github.com/users/ttriche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttriche/subscriptions","organizations_url":"https://api.github.com/users/ttriche/orgs","repos_url":"https://api.github.com/users/ttriche/repos","events_url":"https://api.github.com/users/ttriche/events{/privacy}","received_events_url":"https://api.github.com/users/ttriche/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T20:53:47Z","updated_at":"2016-08-19T20:53:47Z","body":"odd, but solvable I suppose; either data(db, package=pkg) or features(db)\n\nI should have time to look into this and maybe get a clean solution later\nthis afternoon (working on slides & manuscripts ATM)\n\n\n--t\n\nOn Fri, Aug 19, 2016 at 1:50 PM, Anthony R. Colombo <\nnotifications@github.com> wrote:\n\n> One alternative is to save the sqlite db as rda and store into /data dir\n> and use data(db,package=ensdblite.species.build) to load in Namespace\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/RamsinghLab/TxDbLite/issues/27#issuecomment-241131727>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAARIh1UOn0Plef-aR_jrRG_mqnSuNxGks5qhhcygaJpZM4Jo1wj>\n> .\n>\n"}}
{"actor":{"display_login":"ttriche"}}