[R] Generating the Ctrl-M character
David Winsemius
dwinsemius at comcast.net
Fri Nov 11 04:57:36 CET 2011
On Nov 10, 2011, at 9:35 PM, Ashim Kapoor wrote:
> Dear R-helpers,
>
> I want to append a Ctrl-M character to a string and then save it to
> a text
> file.
>
> mystring<-"This is a test."
>
> # How do I add a Ctrl-M to it in the end ??
>
> cat(mystring,file="testfile")
>
> cntrl_m <- intToUtf8(13)
> cat(cntrl_m,file="testfile")
The resulting file seems to have a "blank line" in my editor.
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list