Re: [R] SQLite: When reading a table, a "\r" is padded onto the last column. Why?

From: Søren Højsgaard <Soren.Hojsgaard_at_agrsci.dk>
Date: Wed 03 Jan 2007 - 01:23:29 GMT

Hi,  

I put the iris data into a SQLite database with  

dbWriteTable(con, "iris", iris, row.names=F, overwrite = T)

Then I retrieve data from the database with  

rs <- dbSendQuery(con, "select * from iris") d1 <- fetch(rs)
dbClearResult(rs)

Then I get
> head(d1)

  Sepal_Length Sepal_Width Petal_Length Petal_Width Species

1          5.1         3.5          1.4         0.2 setosa\r
2          4.9         3.0          1.4         0.2 setosa\r
3          4.7         3.2          1.3         0.2 setosa\r
4          4.6         3.1          1.5         0.2 setosa\r
5          5.0         3.6          1.4         0.2 setosa\r
6          5.4         3.9          1.7         0.4 setosa\r

Can anyone explain the extra "\r" at the end? I am on Windows XP using R 2.4.1 Thanks in advance
Søren



R-help@stat.math.ethz.ch 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. Received on Wed Jan 03 23:50:56 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 03 Jan 2007 - 13:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.