[R] Carriage return character issue

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Aug 4 04:29:55 CEST 2010


No, but before you call that function you could use yourdataframe$lastcol <- gsub("\r$","",yourdataframe$lastcol)

"Steven Kang" <stochastickang at gmail.com> wrote:

>Hi all,
>
>I imported a file (in CSV format) into R for processing, then imported the
>result into MySQL. However, there are *carriage return* characters
>(hexadecimal: *0D*) that are appended to the characters in the last field of
>the table.
>
>i.e *\r* appended to the character values (as shown below)
>
>Before importing into MySQL: asdf
>
>After importing into MySQL: asdf*\r*
>**
>**
>
>Are there any options in the function "dbWriteTable" that may resolve this
>issue?
>
>Many thanks in advance.
>
>-- 
>Steven
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at 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.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list