Re: [R] Error in reading subset of data from CSV file

2016-09-05 Thread Florian Schwendinger
There are several issues, 1. I think ReadName = '133261' read.csv.sql("Dat.csv", sql = "select * from file where 'col 1' = ReadName") should be replaced by something like this ReadName = '133261' sql_cmd <- sprintf("select * from file where col_1='%s'", ReadName) sql_cmd read.csv.sql("Dat.csv",

Re: [R] Error in reading subset of data from CSV file

2016-09-05 Thread David L Carlson
L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jim Lemon Sent: Sunday, September 4, 2016 6:39 AM To: Christofer Bogaso Cc: r-help Subject: Re: [R] Error in rea

Re: [R] Error in reading subset of data from CSV file

2016-09-04 Thread Jim Lemon
Shouldn't get that with write.csv. Jim On Sun, Sep 4, 2016 at 9:29 PM, Christofer Bogaso wrote: > Didnt work getting unused argument error. > > On Sun, Sep 4, 2016 at 4:47 PM, Jim Lemon wrote: >> I suppose you could try quote=TRUE >> >> Jim >> >> >> On Sun, Sep 4, 2016 at 8:13 PM, Christof

Re: [R] Error in reading subset of data from CSV file

2016-09-04 Thread Christofer Bogaso
Didnt work getting unused argument error. On Sun, Sep 4, 2016 at 4:47 PM, Jim Lemon wrote: > I suppose you could try quote=TRUE > > Jim > > > On Sun, Sep 4, 2016 at 8:13 PM, Christofer Bogaso > wrote: >> Thanks Jim. But my data is like that and I have to live with that. Any >> idea on workar

Re: [R] Error in reading subset of data from CSV file

2016-09-04 Thread Jim Lemon
I suppose you could try quote=TRUE Jim On Sun, Sep 4, 2016 at 8:13 PM, Christofer Bogaso wrote: > Thanks Jim. But my data is like that and I have to live with that. Any > idea on workaround. Thanks, > > On Sun, Sep 4, 2016 at 3:40 PM, Jim Lemon wrote: >> Hi Christofer, >> You have embedded com

Re: [R] Error in reading subset of data from CSV file

2016-09-04 Thread Christofer Bogaso
Thanks Jim. But my data is like that and I have to live with that. Any idea on workaround. Thanks, On Sun, Sep 4, 2016 at 3:40 PM, Jim Lemon wrote: > Hi Christofer, > You have embedded commas in your data structure. This is guaranteed to > mess up a CSV read. > > Jim > > > On Sun, Sep 4, 2016 at

Re: [R] Error in reading subset of data from CSV file

2016-09-04 Thread Jim Lemon
Hi Christofer, You have embedded commas in your data structure. This is guaranteed to mess up a CSV read. Jim On Sun, Sep 4, 2016 at 5:54 PM, Christofer Bogaso wrote: > Hi again, > > I was trying to read a subset of Data from a CSV file using below code > as example : > > library(sqldf) > > Dat

[R] Error in reading subset of data from CSV file

2016-09-04 Thread Christofer Bogaso
Hi again, I was trying to read a subset of Data from a CSV file using below code as example : library(sqldf) Dat = structure(list(`col 1` = c(133261L, 133261L, 133262L, 133262L ), `col 2` = structure(1:4, .Label = c("aaa1", "aaa2", "bbb1, bbb", "bbb3, bbb"), class = "factor"), `col 3` = c(10.59,