[BioC] Loading more than 16 annotation packages fails
Seth Falcon
seth at userprimary.net
Tue Jul 29 01:53:43 CEST 2008
* On 2008-07-28 at 16:29 -0400 Tarca, Adi wrote:
> I have 17 array annotation packages that I want to load and use the
> information in them.
> After every package loading (via require) I detach the package.
> However, I run out of RS-DBI connections.
> Here is the code:
>
>
> > chips
> [1] "ag" "ath1121501" "drosgenome1" "drosophila2" "hcg110"
> "hgfocus" "hgu133a" "hgu133a2"
> [9] "hgu133b" "hgu133plus2" "hgu95a" "hgu95av2" "hgu95b"
> "hgu95d" "hgu95e" "hu35ksuba"
> [17] "hu35ksubb"
> > for (cip in 1:length(chips)){
> + if (require(paste(chips[cip],"db",sep="."),character.only=TRUE)){
> +
> + pac<-paste("package:",chips[cip],".db",sep="")
> + detach(pos = match(pac, search()))
Try passing unload=TRUE to detach?
The following is working for me, although I probably have out of date
packages:
for (x in 1:50) {
require("rae230a.db")
detach("package:rae230a.db", unload=TRUE)
}
Unloading the rae230a.db namespace gives a warning, which is probably
another matter:
> require("rae230a.db")
Loading required package: rae230a.db
> detach("package:rae230a.db", unload=TRUE)
Warning message:
In getPackageName(where) :
Created a package name, "2008-07-28 16:52:36", when none found
> sessionInfo()
R version 2.8.0 Under development (unstable) (--)
i386-apple-darwin9.2.2
locale:
C
attached base packages:
[1] tools stats graphics grDevices datasets utils methods
[8] base
other attached packages:
[1] AnnotationDbi_1.1.20 RSQLite_0.6-8 DBI_0.2-4
[4] Biobase_1.17.13
--
Seth Falcon | http://userprimary.net/user/
More information about the Bioconductor
mailing list