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") Many thanks, Ashim [[alternative HTML version deleted]]
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