From ripley at stats.ox.ac.uk  Fri Jun 20 13:57:37 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Jun 20 13:57:42 2003
Subject: [Rd] paste(character(0), character(0)) == "".  Why?
Message-ID: <Pine.LNX.4.44.0306201250330.22758-100000@gannet.stats>

This seems to be deliberate, since paste.c says

    if(maxlen == 0)
	return mkString("");

but it is not documented and it is not what S (even S+3.4) does.

On the other hand, S gives

> paste(character(0), character(0), collapse="+")
[1] " "

which looks incorrect to me (and R gives "" which I reckon to be right).

Anyone know the rhyme or reason here?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] paste(character(0), character(0)) == "". Why?
Prof Brian Ripley