dynamic library() calls
1
0
Entering edit mode
@jeremiah-h-savage-4102
Last seen 9.7 years ago
I am attempting to use GEOmetadb to select which Affymetrix db to load, but I get errors from the library() call. Any ideas on what to fix to get this to work? Thank, Jeremiah loadlib <- function() { library(GEOmetadb) if (file.exists("GEOmetadb.sqlite")) { con <- dbConnect("SQLite","GEOmetadb.sqlite") } else { getSQLiteFile() con <- dbConnect(SQLite(),"GEOmetadb.sqlite") } rs <- dbGetQuery(con,"select bioc_package from gpl where gpl='GPL570'") gpllibrary <- paste(rs,".db",sep="") library(gpllibrary) # Error in library(gpllibrary) : there is no package called 'gpllibrary' library(gpllibrary[1]) # Error in library(gpllibrary[1]) : 'package' must be of length 1 library(as.character(gpllibrary)) # Error in library(as.character(gpllibrary)) : # 'package' must be of length 1 } [[alternative HTML version deleted]]
GEOmetadb GEOmetadb • 1.5k views
ADD COMMENT
0
Entering edit mode
@jeremiah-h-savage-4102
Last seen 9.7 years ago
Never mind, I found the fix: library(gpllibrary,character.only=TRUE) On Mon, Jun 28, 2010 at 4:18 PM, Jeremiah H. Savage < jeremiahsavage@gmail.com> wrote: > I am attempting to use GEOmetadb to select which Affymetrix db to load, but > I get errors from the library() call. > > Any ideas on what to fix to get this to work? > > Thank, > Jeremiah > > loadlib <- function() > { > library(GEOmetadb) > > if (file.exists("GEOmetadb.sqlite")) { > con <- dbConnect("SQLite","GEOmetadb.sqlite") > } > > else { > getSQLiteFile() > con <- dbConnect(SQLite(),"GEOmetadb.sqlite") > } > > rs <- dbGetQuery(con,"select bioc_package from gpl where gpl='GPL570'") > gpllibrary <- paste(rs,".db",sep="") > library(gpllibrary) > # Error in library(gpllibrary) : there is no package called > 'gpllibrary' > library(gpllibrary[1]) > # Error in library(gpllibrary[1]) : 'package' must be of length 1 > library(as.character(gpllibrary)) > # Error in library(as.character(gpllibrary)) : > # 'package' must be of length 1 > } > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 716 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6