How to read .sql files in R

2,192 views
Skip to first unread message

florian...@gmail.com

unread,
Nov 3, 2014, 5:46:54 AM11/3/14
to sq...@googlegroups.com
Dear sqldf users,

I use R for my statistic analysis. I've got several .sql files countaining the data of an experiment, and I want to read this data with R. The data that I try to read are distributed in several table into the sql file (table : answers, users, ...) and I need to bind these different data tables in order to build a set of data suitable for data analysis (for example, categorical data from 'users' table need to match with data from 'answers' table). I've loaded sqldf package, updated R (version 3.1.2) and red how to write sql statments. I tried to read my sql files with sqldf and read.csv.sql functions, but unfortunately got nothing else that these kind of error outputs :

read.csv.sql('file.sql', sql="SELECT * FROM users")
Error in sqliteSendQuery(con, statement, bind.data) :
error in statement: no such table: users

(I've tried a lot of other syntaxes and adding arguments to the function without success...)

Do somebody have an idea of how to do that?

Many thanks!

Florian

Gabor Grothendieck

unread,
Nov 6, 2014, 6:42:02 PM11/6/14
to sq...@googlegroups.com, florian...@gmail.com
As already discussed in other messages and in the Latest News section on the home page (http://sqldf.googlecode.com) this is fixed in the development version.
Reply all
Reply to author
Forward
0 new messages