Search
Question: dynamic library() calls
0
gravatar for Jeremiah H. Savage
7.4 years ago by
Jeremiah H. Savage110 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 COMMENTlink modified 7.4 years ago • written 7.4 years ago by Jeremiah H. Savage110
0
gravatar for Jeremiah H. Savage
7.4 years ago by
Jeremiah H. Savage110 wrote:
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 COMMENTlink written 7.4 years ago by Jeremiah H. Savage110
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 187 users visited in the last hour