Re: [R] read.csv.sql() to select from a large csv file

2012-12-01 Thread Gabor Grothendieck
On Fri, Nov 23, 2012 at 5:05 PM, Juliane Struve wrote: > Rui, Anthony, and Gabor, > > I got this to work in the end: > > for(i in length(Names_EastCoast){ > name <- Names_EastCoast[i] > sql <- paste("select * from file where ID = > '",name,"'",sep = "") > Data <- read.csv.sql("filename",sql = sql)

Re: [R] read.csv.sql() to select from a large csv file

2012-11-23 Thread Juliane Struve
loops through all individuals in the csv file.   Thanks a lot for all replies.   Juliane   From: Rui Barradas Cc: Rmailinglist Sent: Friday, 23 November 2012, 11:56 Subject: Re: [R] read.csv.sql() to select from a large csv file Hello, Try forming th

Re: [R] read.csv.sql() to select from a large csv file

2012-11-23 Thread Rui Barradas
Hello, Try forming the sql statement with paste(). Name <- "Bobby" sqlstatement <- paste("select * from file where ID = '", Name, "'", sep = "") read.csv.sql("filename", sql = sqlstatement) Note the opening and closing quotes around the name. Hope this helps, Rui Barradas Em 23-11-2012 16:12,

Re: [R] read.csv.sql() to select from a large csv file

2012-11-23 Thread Anthony Damico
you need to construct the character string. here's what you want to give to the sql argument -- paste( 'select * from file where ID = ' , Name ) so try Name <- "Bobby" read.csv.sql("filename",sql = paste( 'select * from file where ID = ' , Name ) ) On Fri, Nov 23, 2012 at 11:12 AM, Juliane St

Re: [R] read.csv.sql() to select from a large csv file

2012-11-23 Thread Gabor Grothendieck
On Fri, Nov 23, 2012 at 11:12 AM, Juliane Struve wrote: > Dear list, > > Dear list, > I am using read.csv.sql() from the sqldf package to read > individual-based data from a csv file that is too large for R. > My original file contains a column called “ID” that > identifies the individual. I would

[R] read.csv.sql() to select from a large csv file

2012-11-23 Thread Juliane Struve
Dear list,   Dear list, I am using read.csv.sql() from the sqldf package to read individual-based data from a csv file that is too large for R. My original file contains a column called “ID” that identifies the individual. I would like to read in data for only one individual at a time, for e