[R-sig-DB] Fwd: rmysql and strings containg \n

Jeffrey Horner je||@horner @end|ng |rom v@nderb||t@edu
Mon Oct 26 14:47:27 CET 2009


Hi H. Felix Wittmann,

We require that you tell us R's version, RMySQL's version, and MySQL's 
version upon which you are running your code. Then we can better 
determine if your problem is a bug or a feature.

Best,

Jeff

H. Felix Wittmann wrote on 10/20/2009 04:37 PM:
> I' ve noticed a few typos in my previous post therefore I send a
> cleaned up version
> 
> 
> require(RMySQL)
> 
> m <- dbDriver("MySQL")
> myCon <- dbConnect(m,group = 'whateverGroup')
> # replace this (ie 'whateverGroup') by the appropriate group specified
> in your my.cnf file
> # on a typical UBUNTU installation you can
> # modify this using the command line editor (eg bash) by this command
> # sudo nano /etc/mysql/my.cnf
> 
> test <- data.frame(id=1,myString='beginning1 \n end1')
> # the above line produces (this is what the output should like like) :
> # > test
> #   id           myString
> # 1  1 beginning1 \n end1
> 
> dbWriteTable(myCon,name='test', value=test)
> dbReadTable(myCon,name='test')
> # the above line produces (here we can see that the output is not the
> same as above) :
> #       id    myString
> # 1      1 beginning1
> #  end1 NA        <NA>
> 
> 
> H. Felix Wittmann
> 
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-db


-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner




More information about the R-sig-DB mailing list