Message-ID: <93148E7E-6D11-4C91-8375-42B1282948F4@comcast.net>
Date: 2011-11-11T03:57:36Z
From: David Winsemius
Subject: Generating the Ctrl-M character
In-Reply-To: <CAC8=1eodumg=eAO24XvwA+drayRf3t72kx62Dc4YjC5B12Pidw@mail.gmail.com>
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