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)
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
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,
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
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
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
6 matches
Mail list logo