From ripley at stats.ox.ac.uk  Wed Nov 19 23:13:14 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 19 Nov 2008 22:13:14 +0000 (GMT)
Subject: [Rd] paste() retains quotes (PR#13304)
In-Reply-To: <20081119140504.E94D6282EFC1@mail.pubhealth.ku.dk>
References: <20081119140504.E94D6282EFC1@mail.pubhealth.ku.dk>
Message-ID: <alpine.LFD.2.00.0811192212140.5606@auk.stats.ox.ac.uk>

On Wed, 19 Nov 2008, gilescrane at verizon.net wrote:

> Full_Name: Giles L Crane
> Version: 2.8.0 2008-10-20
> OS: Windows XP
> Submission from: (NULL) (71.168.215.186)
>
>
> paste(rep(" ",10),sep="")
> [1] " " " " " " " " " " " " " " " " " " " "
>
> As I read the documentation for paste(),
> this should have produced
> "         "
> that is, all spaces pasted together.

You read it wrong: that is what collapse="" does.

> Hope this is helpful.

Quite the reverse, a beginners' mistake.

> GLC
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at 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() retains quotes (PR#13304)
Prof Brian Ripley