From ripley at stats.ox.ac.uk  Thu Feb  5 09:01:13 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu Feb  5 09:01:33 2004
Subject: [Rd] minor (possibly documentation) bug in seq
In-Reply-To: <200402041415.05423.deepayan@stat.wisc.edu>
Message-ID: <Pine.LNX.4.44.0402050745480.8979-100000@gannet.stats>

On Wed, 4 Feb 2004, Deepayan Sarkar wrote:

> 
> With today's r-devel, help(seq) says:
> 
>      The last generates the sequence '1, 2', ..., 'length(along)',
>      unless the argument is of length 1 when it is interpreted as a
>      'length' argument.
> 
> referring to the usage 
> 
>      seq(along)
> 
> This is not true for 0:
> 
> > seq(0)
> [1] 1 0
> > seq(length = 0)
> numeric(0)
> 
> I'm not sure what the intended behaviour of seq(0) is, but either seq()
> or the help page should be fixed.

Nor am I, but it seems S documents the behaviour as 1:from, so I guess 
that is intended.

> Also, the exception (naturally) holds only for _numeric_ arguments of length 
> 1. 

I've altered the help page.

-- 
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] minor (possibly documentation) bug in seq
Prof Brian Ripley