Rdbi.PgSQL
6
0
Entering edit mode
@hrishikesh-deshmukh-1008
Last seen 10.2 years ago
Hi, I am trying to connect test DB in postgres and i have installed RdbiPgSQL; getBioC("database") option, yet i get this error! library(RdbiPgSQL) Error in library(RdbiPgSQL) : There is no package called 'RdbiPgSQL' Why i am unable to figure out. Thanks, Hrishi
• 1.7k views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.2 years ago
Hi Hrishi, I just tried getBioC("database") and the RdbiPgSQL didn't get downloaded. The Rdbi package did get installed. I will look into this. Note, however, that the RdbiPgSQL package is only available as a Source package --- that is, if you are using Windows, you may not be able to use this package at this time. If you are on Linux you can use reposTools to install the RdbiPgSQL package: library(reposTools) install.packages2("RdbiPgSQL") Hope that helps some. As an aside, please remind us of your platform, R version, package versions as a part of your posts. A nice way to do this is to include the output of sessionInfo(). + seth Hrishikesh Deshmukh <d_hrishikesh@yahoo.com> writes: > Hi, > > I am trying to connect test DB in postgres and i have > installed RdbiPgSQL; getBioC("database") option, yet i > get this error! > library(RdbiPgSQL) > Error in library(RdbiPgSQL) : There is no package > called 'RdbiPgSQL' > > Why i am unable to figure out. > > Thanks, > Hrishi > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@hrishikesh-deshmukh-1008
Last seen 10.2 years ago
Hi, I am using Debian linux, i use apt-get to install postgresql and installation is all done by apt-get install command! Any pointers how to find postgresql client libs on debian! Thanks, Hrishi > library(reposTools) Loading required package: tools > install.packages2("RdbiPgSQL") Note: Using download type: Source [1] "Attempting to download RdbiPgSQL from http://www.bioconductor.org/repository/release1.5/package/Source" [1] "Download complete." [1] "Installing RdbiPgSQL" * Installing *source* package 'RdbiPgSQL' ... creating cache ./config.cache checking for PQconnectdb in -lpq... no I could not find your PostgreSQL client libraries! Use --with-pgsql-libraries=PATH; if running R's INSTALL, use --configure-args='--with-pgsql-libraries=PATH'; or set PG_LIB_DIR in your environment to the library path, and rerun the configure/install. ERROR: configuration failed for package 'RdbiPgSQL' >From URL: http://www.bioconductor.org/repository/release1.5/package/Source RdbiPgSQL version 1.0.9 Warning message: Installation of package RdbiPgSQL had non-zero exit status in: installPkg(fileName, pkg, pkgVer, type, lib, repEntry, versForce) > sessionInfo() R version 2.0.1, 2004-11-15, i386-pc-linux-gnu attached base packages: [1] "tools" "methods" "stats" "graphics" "grDevices" "utils" [7] "datasets" "base" other attached packages: reposTools "1.5.14" --- Seth Falcon <sfalcon@fhcrc.org> wrote: > Hi Hrishi, > > I just tried getBioC("database") and the RdbiPgSQL > didn't get > downloaded. The Rdbi package did get installed. I > will look into > this. > > Note, however, that the RdbiPgSQL package is only > available as a > Source package --- that is, if you are using > Windows, you may not be > able to use this package at this time. > > If you are on Linux you can use reposTools to > install the RdbiPgSQL > package: > > library(reposTools) > install.packages2("RdbiPgSQL") > > Hope that helps some. > > As an aside, please remind us of your platform, R > version, package > versions as a part of your posts. A nice way to do > this is to include > the output of sessionInfo(). > > + seth > > > Hrishikesh Deshmukh <d_hrishikesh@yahoo.com> writes: > > > Hi, > > > > I am trying to connect test DB in postgres and i > have > > installed RdbiPgSQL; getBioC("database") option, > yet i > > get this error! > > library(RdbiPgSQL) > > Error in library(RdbiPgSQL) : There is no package > > called 'RdbiPgSQL' > > > > Why i am unable to figure out. > > > > Thanks, > > Hrishi > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
Hrishikesh Deshmukh wrote: > Hi, > > I am using Debian linux, i use apt-get to install > postgresql and installation is all done by apt-get > install command! Any pointers how to find postgresql > client libs on debian! > > Thanks, > Hrishi > apt-get install libpgsql2
ADD REPLY
0
Entering edit mode
@hrishikesh-deshmukh-1008
Last seen 10.2 years ago
Hi All, The solution worked, apparently: Package libpgsql2 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libpq3 libpgeasy-dev I installed libpgeasy-dev and i think postgresql-dev was needed to install RdbiPgSQL. I could not find a vignettes for RdbiPgSQL. Does anybody have pointers/urls/tutorials which tells how to use the package? Thanks, Hrihsi --- Douglas Bates <bates@stat.wisc.edu> wrote: > Hrishikesh Deshmukh wrote: > > Hi, > > > > I am using Debian linux, i use apt-get to install > > postgresql and installation is all done by apt-get > > install command! Any pointers how to find > postgresql > > client libs on debian! > > > > Thanks, > > Hrishi > > > > apt-get install libpgsql2 > >
ADD COMMENT
0
Entering edit mode
@hrishikesh-deshmukh-1008
Last seen 10.2 years ago
Hi All, Can one "timestamp" each query which i run via R against postgresql! Also can i plot (graphs) results for a query say: "select * from IntensityTable and plot histogram of the result" Where can i get vignettes/working examples for RdbiPgSQL! This package is really exiting! Thanks, Hrishi --- Douglas Bates <bates@stat.wisc.edu> wrote: > Hrishikesh Deshmukh wrote: > > Hi, > > > > I am using Debian linux, i use apt-get to install > > postgresql and installation is all done by apt-get > > install command! Any pointers how to find > postgresql > > client libs on debian! > > > > Thanks, > > Hrishi > > > > apt-get install libpgsql2 > >
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
Hrishi, RdbiPgSQL just interacts with the Postgresql database. Your best source of information about working with postgresql is the postgres home page and the documenation. As far as I know, you can't timestamp a simple SQL select statement, but you could make a stored procedure that, when called, does the query and puts a timestamp into some table. This will require working directly with postgresql to define such a procedure (should be pretty simple) rather than through R. Once the stored procedure is created, you can call it from R easily by doing something like: dbGetQuery(con,'select * from mystoredprocedure()') There is a VERY active postgresql community available via the webpage and email lists--you might find it interesting and helpful to move some of your postgres-type questions to those lists. RdbiPgSQL is really good at getting results of queries, but much more complex activities can be performed within postgresql. Hope this helps, Sean ----- Original Message ----- From: "Hrishikesh Deshmukh" <d_hrishikesh@yahoo.com> To: <bates@wisc.edu> Cc: <bioconductor@stat.math.ethz.ch> Sent: Monday, March 21, 2005 10:00 AM Subject: Re: [BioC] Rdbi.PgSQL > Hi All, > > Can one "timestamp" each query which i run via R > against postgresql! Also can i plot (graphs) results > for a query say: > "select * from IntensityTable and plot histogram of > the result" > Where can i get vignettes/working examples for > RdbiPgSQL! > This package is really exiting! > > Thanks, > Hrishi > > > --- Douglas Bates <bates@stat.wisc.edu> wrote: >> Hrishikesh Deshmukh wrote: >> > Hi, >> > >> > I am using Debian linux, i use apt-get to install >> > postgresql and installation is all done by apt-get >> > install command! Any pointers how to find >> postgresql >> > client libs on debian! >> > >> > Thanks, >> > Hrishi >> > >> >> apt-get install libpgsql2 >> >> > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
@hrishikesh-deshmukh-1008
Last seen 10.2 years ago
Hi All, library(RdbiPgSQL) #Connect to DB conn <- dbConnect(PgSQL(), host = "localhost", dbname = "^^^^^",user="&&&&",password="#####") tt <- dbSendQuery(conn,"SELECT * FROM table WHERE signalrawintensity >= 200 and signalrawintensity <= 20000 and pm_mm_other >=0") mytt <- dbGetResult(tt) This works fine but when i run: tt1 <- dbSendQuery(conn,"Create table trial as SELECT * FROM all254gnxdt1 WHERE signalrawintensity >= 200 and signalrawintensity <= 20000 and pm_mm_other >=0") rd<-dbReadTable(conn,trial) I get this error: mylin <- dbGetResult(lin) Error in dbGetResult.PgSQL.result(lin) : Query did not produce any tuples But table "trial" does get created and i can see it but R can't!! Any ideas! Thanks, Hrishi
ADD COMMENT
0
Entering edit mode
On Mar 24, 2005, at 3:29 PM, Hrishikesh Deshmukh wrote: > Hi All, > > library(RdbiPgSQL) > > #Connect to DB > conn <- dbConnect(PgSQL(), host = "localhost", dbname > = "^^^^^",user="&&&&",password="#####") > > tt <- dbSendQuery(conn,"SELECT * FROM table WHERE > signalrawintensity >= 200 and signalrawintensity <= > 20000 and pm_mm_other >=0") > mytt <- dbGetResult(tt) > > This works fine but when i run: > tt1 <- dbSendQuery(conn,"Create table trial as SELECT > * FROM all254gnxdt1 WHERE signalrawintensity >= 200 > and signalrawintensity <= 20000 and pm_mm_other >=0") > rd<-dbReadTable(conn,trial) > > I get this error: > mylin <- dbGetResult(lin) You need to do: rd <- dbReadTable(conn,"trial") Note the quotes. The "did not produce any tuples" is a bit misleading at times. I have found that usually means that I messed up a command (bad SQL, etc), so it usually means go back to check your query. Hope that helps. Sean
ADD REPLY

Login before adding your answer.

Traffic: 753 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