R-alpha: 0.16: paste(.., collapse ) -- incompatibility to S

Martin Maechler (maechler@stat.math.ethz.ch)
Fri, 28 Feb 97 14:49:11 +0100


Date: Fri, 28 Feb 97 14:49:11 +0100
Message-Id: <9702281349.AA02364@>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: 0.16: paste(.., collapse ) -- incompatibility to S

in S,  
	paste(....., collapse = string)

always returns ONE string  (a character vector of length 1),
according to documentation and several examples.

in R, this is not true:

R> paste(rep(" ",0), collapse="...") #anything for collapse
character(0)

S> paste(rep(" ",0), collapse="...") #anything for collapse
[1] ""

--------
Again, I think  R  is more logical than S here, but it was decided
that in minor cases, compatibility comes first...

- Martin Maechler
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


>->->- Local variables:
>->->- mode: text
>->->- outline-regexp: ">->-\\|From \\|Subject:"
>->->- eval: (outline-minor-mode 1)
>->->- eval: (hide-body)
>->->- eval: (show-entry) ;the first one
>->->- End:
>->-> You can look at this file from within GNU emacs,
>->-> using outline-minor-mode ["Headings", "Show", "Hide" Menus under X11]
>->-> --
>->-> OR also simply by 
>->->	/usr/ucb/mail -f  THIS_FILE
>->->