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

______________________________________________
R-help@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.

Reply via email to