search for: dbdriver

Displaying 20 results from an estimated 40 matches for "dbdriver".

2008 Jun 30
2
Using ODBC/RODBC with DBI
Hi all, I would like the following code to work, but it doesn''t: library(DBI) library(RODBC) m <- dbDriver("RODBC") # Example for dbConnect(DBI), causes error m <- dbDriver("ODBC") # Example for DBIDriver-class(DBI), causes error The errors are: Error in do.call(as.character(drvName), list(...)) : could not find function "RODBC" (substitute "ODBC" for &quot...
2010 Nov 01
8
sqldf hanging on macintosh - works on windows
Have a long script that runs fine on windows (32 bit). When I try to run in on two different macs (64 bit), however, it hangs with identical behavior. I start with: library(sqldf) This results in messages: Loading required package: DBI Loading required package: RSQLite Loading required package: RSQLite.extfuns Loading required package: gsubfn Loading required package: proto Loading required
2007 Dec 14
13
connecting RMySQL to and external server
Dear list, I learned how to connect R to a local MySQL server, using: drv <- dbDriver("MySQL") con <- dbConnect(drv, user="root", password="mypass", dbname="mydb") Is it possible to connect R in this way to an external server (on a different machine, with a different IP)? I read the documentation on ?dbConnect (and everything I could fin...
2003 Dec 10
1
How to start RMySQL
...use MySQL database. Here is what I have and done. R 1.8.0 mysql 4.0.16 Both running in Windows XP. I download the RMySQL.zip from the internet and used the Packages installer in the RGui to install RMySQL. I also installed DBI packages. I ran the following and got the error. > mgr<-dbDriver("MySQL") Error in dbDriver("MySQL") : couldn''t find function ".valueClassTest" What did I do wrong? Thanks in advance. Jeff. [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list h...
2007 Aug 11
1
Connecting to database on statup
...possible to create a DBMS connection automatically on startup of R? (Making sure of course that the db server has been started...) I am running MySQL on Mac OS X 10.4.2 with R2.4.1. I have tried to write a function using the RMySQL commands (below) and place them in .First of .RProfile: drv <- dbDriver("MySQL") dbcon <- dbConnect(drv, {other parameters present in my.cnf file} dbname="mydbName") DOES create a connection when entered into my R console individually but NOT when I place them in a function, i.e., condb <- function() { drv <- dbDriver("MySQL")...
2006 Mar 15
4
"\r" with RSQLite
...g, or is the \r that I''m getting in the example below a bug? > a <- (1:10) > b <- (LETTERS[1:10]) > df <- as.data.frame(cbind(a, b)) > > df a b 1 1 A 2 2 B 3 3 C 4 4 D 5 5 E 6 6 F 7 7 G 8 8 H 9 9 I 10 10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test") > dbWriteTable(con, "DF", df, row.names = FALSE, overwrite = TRUE) [1] TRUE > df2 <- dbGetQuery(con, "SELECT DISTINCT * FROM DF") > dbDisconnect(con) [1] TRUE > df2 a b 1...
2006 Mar 15
4
"\r" with RSQLite
...g, or is the \r that I''m getting in the example below a bug? > a <- (1:10) > b <- (LETTERS[1:10]) > df <- as.data.frame(cbind(a, b)) > > df a b 1 1 A 2 2 B 3 3 C 4 4 D 5 5 E 6 6 F 7 7 G 8 8 H 9 9 I 10 10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test") > dbWriteTable(con, "DF", df, row.names = FALSE, overwrite = TRUE) [1] TRUE > df2 <- dbGetQuery(con, "SELECT DISTINCT * FROM DF") > dbDisconnect(con) [1] TRUE > df2 a b 1...
2016 Apr 21
2
Error using RPostgreSQL
Hi, I'm having trouble connecting to my postgreSQL db on Heroku(Amazon) using RPostgreSQL. I've looked through GitHub for people doing the same thing. There are quite a few examples and all look similar to the below: drv <- dbDriver("PostgreSQL") con <- dbConnect( drv, dbname = "dadqn30er7ghpl", host = "ec2-27-837-167-90.eu-west-1.compute.amazonaws.com", port = 5432, user = "tascofyvasswmblc", password = XXXXXX' ); I...
2003 May 12
2
Problem in fetching from Oracle
Dear all, I tried the following in R: >library(ROracle) >ora <- dbDriver("Oracle") >channel <- dbConnect(ora, user = "scott", password="tiger",dbname="abcdef") >rs <- dbSendQuery(channel, "select * from USArrests") >while(!dbHasCompleted(rs)) { xxx <- fetch(rs, n = 5000) } + + + > xxx Erro...
2005 May 02
2
RMySQL query: why result takes so much memory in R ?
...Why does this take > 1G RAM? I run R on suse linux, with 1G RAM and with the code below it even fills the whole 1G of swap. I just don''t understand how 12e6 * 3 can fill such a huge range of RAM? Thanks for clarification and potential solutions. ## my code library(RMySQL) drv <- dbDriver("MySQL") ch <- dbConnect(drv,dbname="testdb", user="root",password="mysql") testdb <- dbGetQuery(ch, "select id, group, measurement from mydata") dbDisconnect(ch) dbUnloadDriver(drv) ## end of my code Cheers Christop...
2006 Nov 26
8
Questions about generating samples in R
Hello! I have a data set with 8 columns and in about 5000 rows. What I want to do is to generate samples of this data set. Samples of a special size, as example 200. What is the easiest way to do this? No special things are needed, only the random selection of 200 rows of the data set. Thanks Alex -- Alexander Geisler * Kaltenbach 151 * A-6272 Kaltenbach email: alexander.geisler at gmx.at
2004 Mar 10
2
Inserting Date Field into Oracle table using ROracle
Hello, Attached is a mail regarding question how to insert Date field using ROracle package. I am stuck with this problem and appreciate receiving help from gurus on this list. Code used mainly is: library(ROracle) ### --- Version 0.53 drv <- dbDriver("Oracle") con <- dbConnect( drv, "user/passwd") d <- data.frame(CDATE = "2004-03-10 10:12:00") ps <- dbPrepareStatement(con, "INSERT into DATEST (CDATE) VALUES ( :1 ) ", bind=c( "character")) ## -- c("date") does not...
2003 Apr 24
1
RMySQL
Dear laurent, > This is what I did to make the connection : > > drv <- dbDriver("MySQL") > > con <- dbConnect(drv) Here''s the error. You should give the database name. drv <-dbConnect(drv, dbname="dfghdfgsdfgsdfgsdfgsdfgsdfgsdf") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Then I should be able to send requests. B...
2003 Dec 11
0
SV: How to start RMySQL
...use MySQL database. Here is what I have and done. R 1.8.0 mysql 4.0.16 Both running in Windows XP. I download the RMySQL.zip from the internet and used the Packages installer in the RGui to install RMySQL. I also installed DBI packages. I ran the following and got the error. > mgr<-dbDriver("MySQL") Error in dbDriver("MySQL") : couldn''t find function ".valueClassTest" What did I do wrong? Thanks in advance. Jeff. [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing lis...
2004 Jan 09
1
R and Postgresql (DBI)
Hi, I''m running Debian (Sid), Postgres (7.3.4) and R (1.8.1). I get the following error when I tri to use DBI >library("DBI") > p <- dbDriver("PostgreSQL") Error in do.call(as.character(drvName), list(...)) : couldn''t find function "PostgreSQL" Is there any other package I need in order to interface between R and Postgres ? thanks Ian __________________________________
2004 Dec 09
1
ROracle/DBI problem with dbExecStatement on RH Linux
Hi, first thanks to Sunny Ho (and David James for the pointer) for resolving the problem of the empty rows returned from ROracle. However, I have a problem still: > library(ROracle) > ora <- dbDriver("Oracle") > con <- dbConnect(ora, user = USER, password = PWD, dbname = DBNAME) > rs <- dbExecStatement(con, "select * from USER_TABLES") Error in .class1(object) : No direct or inherited method for function "dbExecStatement" for this call dbSendQue...
2005 Jan 29
2
Database Connection Problem with RMySQL package
...s: Microsoft Windows XP 5.1.2600 MySQL 4.1.9 R 2.0.1 DBI 0.1-8 RMySQL 0.5-5 Both of DBI and RMySQL packages were downloaded from bell lab: http://stat.bell-labs.com/RS-DBI/download/index.html My case in R is as follows: > library(DBI) > library(RMySQL) > mgr <- dbDriver("MySQL") > con <- dbConnect(mgr, user="root", pass="*******", host="localhost", dbname="campus") Error in mysqlNewConnection(drv, ...) : RS-DBI driver: (could not connect root at localhost on dbname "campus") What am I doing wrong w...
2007 Jan 10
1
using DBI
can anybody provide a reference to a document on using DBI and what is needed to make it work? I try: drv=dbDriver("Oracle") and it complains about not finding a function. The DBI.pdf does not require anything else installed, but looking at the archive I discovered there is more stuff to be installed. This is on Solaris 5.10 with a full Oracle install, so all Oracle libs are available and sqlplus wo...
2011 Dec 01
4
R, PostgresSQL and poor performance
...''m running R (2.14.0) on a Mac (OSX v 10.5.8, 2.66GHz, 4GB memory) and am having a few performance issues with reading data in from a Postres database (using RPostgreSQL). My query / code are as below # ----------------------------- library(''RPostgreSQL'') drv <- dbDriver("PostgreSQL") dbh <- dbConnect(drv,user="…",password="…",dbname="…",host="…") sql <- "select id, date, lon, lat, date_trunc(''day'' , date) as jday, extract(''hour'' from date) as hour, extract(''...
2007 Jun 05
3
multiple plot in odfWeave
...or your help, Laurence. Here the code: My odt file: test2.odt <<loadData, results = hide, echo = FALSE>>= @ <<Connection, echo = FALSE, fig = TRUE>>= library("RMySQL") library(maps) library(mapdata) library(spmaps) library(grid) library(plotrix) drv <- dbDriver("MySQL") con <- dbConnect(drv, user="lamilhat", password="******", dbname="Aquagenome", host="mymachine.toulouse.inra.fr") @ Liste des projets: <<carte2, echo = FALSE, results= verbatim, fig = TRUE>>= lp <- dbSendQuery(con, &q...