[R-sig-DB] Trailing \r in RMySQL on Windows

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Tue Aug 7 05:34:44 CEST 2007


I get \r characters at the end of a table when using
RMySQL on Windows.  See the setosa\r lines below:

> library(RMySQL)
Loading required package: DBI
> m <- dbDriver("MySQL")
> con <- dbConnect(m, dbname = "db01")
> dbWriteTable(con, "iris", iris)
[1] TRUE
Warning message:
$ operator is deprecated for atomic vectors, returning NULL in:
field.types$row.names
> DF <- dbGetQuery(con, "select * from iris limit 3")
> DF
  row_names Sepal_Length Sepal_Width Petal_Length Petal_Width  Species
1         1          5.1         3.5          1.4         0.2 setosa\r
2         2          4.9         3.0          1.4         0.2 setosa\r
3         3          4.7         3.2          1.3         0.2 setosa\r
> dbRemoveTable(con, "iris")
[1] TRUE
> dbDisconnect(con)
[1] TRUE


Here is the input:

library(RMySQL)
m <- dbDriver("MySQL")
con <- dbConnect(m, dbname = "db01")
dbWriteTable(con, "iris", iris)
DF <- dbGetQuery(con, "select * from iris limit 3")
DF
dbRemoveTable(con, "iris")
dbDisconnect(con)

I am using:

- Server version: 5.0.41-community-nt MySQL Community Edition (GPL)
- R version 2.5.1 (2007-06-27) on Windows XP
- DBI 0.2-3
- RMySQL 0.6-0 downloaded from Bioconductor
- I also tried the Rodriguez RMySQL 0.6-0 build and got the same thing
- I also tried the RMySQL 0,6-0 build from CRAN Extras but that one crashes




More information about the R-sig-DB mailing list