583 search results for "SQL"

Clearning up the sqldf confusion

November 29, 2011
By

Apparently I have issues with my reading comprehension and with Textmate (initially) when it comes to using the sqldf package. G. pointed out in the previous comments, I could have just used options(gsubfn.engine = "R") instead of going through the trouble of installing the tcltk binaries. If you’ve got a happy distribution of R that

Read more »

RPostgreSQL 0.2-0, 0.2-1 and an unsung Open Source hero

November 21, 2011
By

RPostgreSQL goes back to a topic suggestion I had made for the Google Summer of Code 2008, and specifically for the R Project participation that year. And Sameer Kumar Prayaga (whom I then mentored for the project) did a fine job that summer putting t...

Read more »

Installing the RMySQL package on Windows 7

October 25, 2011
By

So you want to get statistical? Nowadays one of the ways to go is to use R, mostly in combination with ggplot2 for generating the plots. These plots and graphs however need some data, for that we use data sources. There are a lot of data sources availa...

Read more »

Running SQL Queries in R With the SQLDF Package

October 16, 2011
By

  The sqldf package can be used to run sql queries on R data frames. The user simply needs to specify a sql statement enclosed by quotation marks within the sqldf() function. In the follow R code, you see various ways of using the sqldf package to run sql queries on R data frames. The sql

Read more »

MySQL and R

August 15, 2011
By

Using MySQL with R is pretty easy, with RMySQL. Here are a few notes to keep me straight on a few things I always get snagged on. Typically, most folks are going to want to analyze data that's already in a MySQL database. Being a little bass-ackwards, I often want to go the other way. One reason to do...

Read more »

Dump MySQL to CSV using R

August 10, 2011
By

Based on a related post on one of my favorite python-lists I remembered, that I wrote a similar snipplet some time ago. So if you want to dump your whole MySQL database to csv-files you can recycle the following code: ?Download mysql2cvs.R1 2 3 4 5 6 7 8 9 require(RMySQL) m<-MySQL() summary(m) con<-dbConnect(m, dbname

Read more »

Accessing MySQL through R

May 5, 2011
By

Connecting to MySQL is made very easy with the RMySQL package. To connect to a MySQL database simply install the package and load the library.install.packages("RMySQL")library(RMySQL)Connecting to MySQL:Once the RMySQL library is installed create a dat...

Read more »

Data Aggregation in R: plyr, sqldf and data.table

April 28, 2011
By
Data Aggregation in R: plyr, sqldf and data.table

I’ve also previously put up a couple of posts about aggregating data in R. In this post, I’m going to be trying some other alternative methods for aggregating the dataset. Before I begin, I’d like to thank Matthew Dowle for highlighting these to me. It’s a bit daunting at first, deciding which method of aggregating data is

Read more »

Applying functions on groups: sqldf, plyr, doBy, aggregate or data.table ?

March 17, 2011
By
Applying functions on groups: sqldf, plyr, doBy, aggregate or data.table ?

Which one of the sqldf, plyr, doBy and aggregate functions/packages would be faster for applying functions on groups of rows? I was wondering about this earlier in this post.  It seems sqldf would be the fastest according to a post in manipulatr m...

Read more »

Applying functions on groups: sqldf, plyr, doBy, aggregate or data.table ?

March 17, 2011
By
Applying functions on groups: sqldf, plyr, doBy, aggregate or data.table ?

Which one of the sqldf, plyr, doBy and aggregate functions/packages would be faster for applying functions on groups of rows? I was wondering about this earlier in this post.  It seems sqldf would be the fastest according to a post in manipulatr m...

Read more »