puzzled by cat() behaviour when argument '...' is a vector(and argument 'sep' contains "\n")
-----Original Message----- From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of William Dunlap Sent: Wednesday, November 05, 2008 4:51 PM To: Duncan Murdoch; Peter Ruckdeschel Cc: r-devel at r-project.org Subject: Re: [Rd] puzzled by cat() behaviour when argument '...' is a vector(and argument 'sep' contains "\n")
...
Neither use any entry in sep after the end of the cat() output, although, because of the previous rule, it may seem that they do in the common case of sep="".
I meant 'common case of sep="\n"'.
I had forgotten that sep= could be vectorized and use paste() instead of cat() when I needed such functionality. IMO, paste() has fewer surprises. Bill Dunlap TIBCO Spotfire Inc wdunlap tibco.com