[R] question about ?list

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 17 11:13:24 CEST 2005


The help page means exactly what it says, but the English is too subtle 
and I have reworded it.

I have no idea why you are interested in pairlists (they are hardly used 
at user-visible level these days).  The point is that pairlist() is NULL 
and so strictly not a pairlist at all (try typeof() on it).  However, 
is.pairlist(NULL) is true for historical reasons.

On Fri, 14 Oct 2005, ronggui wrote:

> the help page says:
>
> 'is.list' returns 'TRUE' iff its argument is a 'list' _or_ a
>     'pairlist' of 'length' > 0, whereas 'is.pairlist' only returns
>     'TRUE' in the latter case.
>
> does the "latter case" mean a 'pairlist' of 'length' > 0?
>
> but
>> is.pairlist(pairlist())
> [1] TRUE
>> length(pairlist())
> [1] 0
>
> what the help page exactly means?
>
> 2005-10-14
>
> ------
> Deparment of Sociology
> Fudan University

-- 
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




More information about the R-help mailing list