sqldf Questions

4

Solved

I am trying to do data analysis in R on a group of medium sized datasets. One of the analyses I need to do requires me to do a full outer join amongst around 24-48 files, each of with has about 60 ...
Nowicki asked 6/6, 2013 at 14:30

1

Solved

I am reading from a huge text file that has '%d/%m/%Y' date format. I want to use read.csv.sql of sqldf to read and filter the data by date at the same time. This is to save memory usage and run ti...
Skillless asked 7/9, 2014 at 19:49

2

Solved

In R I want to merge two dataframes on a range of dates, taking all rows from the second dataframe which fall on and between two columns of dates from the first dataframe. I couldn't find a strictl...
Covalence asked 15/4, 2014 at 22:44

2

I am in the midst of re-writing a SAS program I normally use into R. Many statements in the SAS program are written with proc sql, so for ease of programming I am replicating those statements with ...
Stronghold asked 2/8, 2012 at 19:4

1

Solved

The easy answer to this is "buy more RAM" but I am hoping to get a more constructive answer and learn something in the process. I am running Windows 7 64-bit with 8GB of RAM. I have several very ...
Yardarm asked 20/12, 2013 at 22:34

3

Solved

I have some query like this: sqldf("select TenScore from data where State_P = 'AndhraPradesh'") But I have "AndhraPradesh" in a variable stateValue. How can I use this variable in a select query...
Centennial asked 25/9, 2011 at 19:20

3

Solved

I have a dataset with 500k appointments lasting between 5 and 60 minutes. tdata <- structure(list(Start = structure(c(1325493000, 1325493600, 1325494200, 1325494800, 1325494800, 1325495400, 13...
Schlicher asked 18/6, 2013 at 12:15

1

Solved

Is there a way to call R functions from sqldf queries? E.g. sqldf("select paste('Hello', 'World')") Or, is there a way to define custom functions or stored procedures within the SQLite engine be...
Merci asked 8/5, 2013 at 22:25

2

Solved

I am trying to populate a binary vector based on the intersection of two data.frames on multiple criteria. I have the code working but I feel that it is memory excessive just to get the binary ve...
Efferent asked 24/3, 2013 at 4:42

1

Reading around, I found out that the best way to read a larger-than-memory csv file is to use read.csv.sql from package sqldf. This function will read the data directly into a sqlite database, and ...
Syllabize asked 12/9, 2012 at 15:3

3

Solved

I am looking for a fast way to extract a large number of rows from an even larger table. The top of my table is as follows: > head(dbsnp) snp gene distance rs5 rs5 KRIT1 1 rs6 rs6 CYP51A1 1 r...
Shirring asked 30/8, 2012 at 19:34

1

Solved

On my machine, sqldf changes a POSIXct from localtime(I'm at CST, GMT -0600) to GMT/UTC. Is this expected behavior? Can I stop R or sqldf from doing this? Here is my code: > library('sqldf') &g...
Morbilli asked 1/3, 2012 at 19:0

2

Solved

I am used to writing data manipulation logic in SQL and now that I am learning R I find myself sometimes just wanting to do something that would be simple in SQL but I have to learn a bunch of stuf...
Woodenware asked 23/7, 2009 at 4:4

© 2022 - 2024 — McMap. All rights reserved.