[R] Database connection query

2015-02-09 Thread Lalitha Kristipati
Hi, I would like to know when to use drivers and when to use packages to connect to databases in R Regards, Lalitha Kristipati Associate Software Engineer Disclaimer:

Re: [R] Database connection query

2015-02-09 Thread Marc Schwartz
On Feb 9, 2015, at 4:33 AM, Lalitha Kristipati lalitha.kristip...@techmahindra.com wrote: Hi, I would like to know when to use drivers and when to use packages to connect to databases in R Regards, Lalitha Kristipati Associate Software Engineer In general, you will need both.

[R] Database Connectivity Performance Comparison with ROracle

2013-06-13 Thread Mark Hornick
R users have a few choices of how to connect to their Oracle Database. The most commonly seen include: RODBC, RJDBC, and ROracle. However, these three packages have significantly different performance and scalability characteristics which can greatly impact application development. This blog

[R] Database connectivity

2012-04-16 Thread Partha Sinha
Dear All please let me know how to connect SQL server from R? which all packages I will require for this? Thanks Parth __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Database connectivity

2012-04-16 Thread andrija djurovic
RODBC On Mon, Apr 16, 2012 at 11:40 AM, Partha Sinha pnsinh...@gmail.com wrote: Dear All please let me know how to connect SQL server from R? which all packages I will require for this? Thanks Parth __ R-help@r-project.org mailing list

Re: [R] Database

2012-02-29 Thread R. Michael Weylandt
I don't use Access but my general impression is that the advantages it brings will be similar to those brought by any other database: performance rather than ability -- they are both Turing complete after all, after some trickery on the SQL end. Databases allow much larger data sets than R

Re: [R] Database

2012-02-29 Thread Prof Brian Ripley
On 29/02/2012 12:45, R. Michael Weylandt wrote: I don't use Access but my general impression is that the advantages it brings will be similar to those brought by any other database: performance rather than ability -- they are both Turing complete after all, after some trickery on the SQL end.

Re: [R] Database

2012-02-29 Thread Gabor Grothendieck
On Tue, Feb 28, 2012 at 6:06 PM, Trying To learn again tryingtolearnag...@gmail.com wrote: Hi all, I´m new using Access. I see that many things that you can do on Access you can do on CRAN R but not on contrary. My question is: Is there any manual with examples comparing how to do data base

Re: [R] Database

2012-02-29 Thread John Kane
ON Canada -Original Message- From: tryingtolearnag...@gmail.com Sent: Wed, 29 Feb 2012 00:06:08 +0100 To: r-help@r-project.org Subject: [R] Database Hi all, I4m new using Access. I see that many things that you can do on Access you can do on CRAN R but not on contrary. My question

[R] Database

2012-02-28 Thread Trying To learn again
Hi all, I´m new using Access. I see that many things that you can do on Access you can do on CRAN R but not on contrary. My question is: Is there any manual with examples comparing how to do data base analysis on access and making the same on CRAN R? Imagine I want to compare two columns Name

Re: [R] Database abstraction

2011-02-28 Thread Rob Paul Tirrell
to release this in the near future. I've been using Roxygen for documentation, but support for annotations on R5 methods isn't great... Thanks all. - Original Message - From: Rob Tirrell r...@stanford.edu To: r-help@r-project.org Sent: Sunday, February 27, 2011 2:38:18 AM Subject: [R

[R] Database abstraction

2011-02-27 Thread Rob Tirrell
Hi all - I've been working on a lite ORM and database abstraction package for R. Formatting complex queries by hand has always been an error-prone hassle, so I've tried to do away with that as much as possible, instead, using R objects to represent elements of a database system (statements,

[R] database table merging tips with R

2008-09-11 Thread Avram Aelony
Dear R list, What is the best way to efficiently marry an R dataset with a very large (Oracle) database table? The goal is to only return Oracle table rows that match IDs present in the R dataset. I have an R data frame with 2000 user IDs analogous to: r =

Re: [R] database table merging tips with R

2008-09-11 Thread Aaron Mackey
I would load your set of userid's into a temporary table in oracle, then join that table with the rest of your SQL query to get only the matching rows out. -Aaron On Thu, Sep 11, 2008 at 2:33 PM, Avram Aelony [EMAIL PROTECTED] wrote: Dear R list, What is the best way to efficiently marry an

Re: [R] database table merging tips with R

2008-09-11 Thread Aaron Mackey
Sorry, I see now you want to avoid this, but you did ask what was the best way to efficiently ..., and the temp. table solution certainly matches your description. What's wrong with using a temporary table? -Aaron On Thu, Sep 11, 2008 at 3:05 PM, Aaron Mackey [EMAIL PROTECTED] wrote: I would

Re: [R] database table merging tips with R

2008-09-11 Thread Avram Aelony
Perhaps I will need to create a temp table, but I am asking if there is a way to avoid it. It would be great if there were a way to tie the R data frame temporarily to the query in a transparent fashion. If not, I will see if I can create/drop the temp table directly from sqlQuery. -Avram

Re: [R] database table merging tips with R

2008-09-11 Thread Aaron Mackey
I guess I'd do it something like this: dbGetQuery(con, CREATE TEMPORARY TABLE foo ( etc etc)) sapply(@userids, function (x) { dbGetQuery(con, paste(INSERT INTO foo (userid) VALUES (, x, ))) }) then later: dbGetQuery(con, DROP TABLE foo); -Aaron On Thu, Sep 11, 2008 at 3:21 PM, Avram Aelony

Re: [R] database table merging tips with R

2008-09-11 Thread Coey Minear
Aaron Mackey writes: I guess I'd do it something like this: dbGetQuery(con, CREATE TEMPORARY TABLE foo ( etc etc)) sapply(@userids, function (x) { dbGetQuery(con, paste(INSERT INTO foo (userid) VALUES (, x, ))) }) then later: dbGetQuery(con, DROP TABLE foo); Actually,

Re: [R] database table merging tips with R

2008-09-11 Thread Coey Minear
While the subquery with a temporary table is probably the better option, you could just manually generate the subquery and pass it in with the query. As an example, if you have user_ids 1000-1005, instead of having ... where user_id in (select user_id from r_user_id), you would have ... where

Re: [R] database table merging tips with R

2008-09-11 Thread Avram Aelony
I have not devoted time to setting up ROracle since binaries are not available and it seems to require some effort to compile (see http://cran.r-project.org/web/packages/ROracle/index.html). On the other hand, RODBC worked more or less magically once I set up the data sources. What is your

Re: [R] database table merging tips with R

2008-09-11 Thread Coey Minear
Avram Aelony writes: I have not devoted time to setting up ROracle since binaries are not available and it seems to require some effort to compile (see http://cran.r-project.org/web/packages/ROracle/index.html). On the other hand, RODBC worked more or less magically once I set up the

Re: [R] database table merging tips with R

2008-09-11 Thread Avram Aelony
At some point I'd like to try to compile the DBI-based ROracle package as well. For now though, I'll stick with RODBC as it seems to do what I need. I believe RODBC is not based on DBI, but that shouldn't preclude using the pre-built subquery option which is a great idea and should work

Re: [R] database table merging tips with R

2008-09-11 Thread Moshe Olshansky
] wrote: From: Avram Aelony [EMAIL PROTECTED] Subject: [R] database table merging tips with R To: [EMAIL PROTECTED] Received: Friday, 12 September, 2008, 4:33 AM Dear R list, What is the best way to efficiently marry an R dataset with a very large (Oracle) database table? The goal

Re: [R] database table merging tips with R

2008-09-11 Thread Moshe Olshansky
Just a small correction: start with s - paste(r$userid,collapse=,) and not s - paste(r$userid,sep=,) --- On Fri, 12/9/08, Moshe Olshansky [EMAIL PROTECTED] wrote: From: Moshe Olshansky [EMAIL PROTECTED] Subject: Re: [R] database table merging tips with R To: [EMAIL PROTECTED], Avram

Re: [R] database table merging tips with R

2008-09-11 Thread Thomas Lumley
On Thu, 11 Sep 2008, Coey Minear wrote: Actually, based on my reading of the DBI reference, you should be able to do the following to create a table (although possibly not temporary): dbWriteTable(connection, r_user_ids, r) Then you can use the following to drop the table: