This worked for me in R 2.11.0 alpha:

df <- data.frame(a = "a\"b", v = 4, z = "this is Z")
write.csv(df, "test.csv", row.names = FALSE, quote = FALSE)
read.csv("test.csv", quote = "")

 -Peter Ehlers

On 2010-04-07 19:09, Hadley Wickham wrote:
df<- data.frame(a = "a\"b")
write.table(df, "test.csv", sep = ",", row = F)

Is there any to load test.csv into R correctly?  I've tried the following:

read.table("test.csv", sep = ",")
[1] V1
<0 rows>  (or 0-length row.names)
Warning message:
In read.table("test.csv", sep = ",") :
   incomplete final line found by readTableHeader on 'test.csv'
read.table("test.csv", sep = ",", allowEscapes = T)
[1] V1
<0 rows>  (or 0-length row.names)
Warning message:
In read.table("test.csv", sep = ",", allowEscapes = T) :
   incomplete final line found by readTableHeader on 'test.csv'

And I can't see any other options in read.table that would apply.

Regards,

Hadley



--
Peter Ehlers
University of Calgary

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to