[R] is.finite() of a list

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Sun Feb 9 09:19:03 CET 2003

On Sun, 9 Feb 2003, stephen wisdom wrote:

> > ?is.finite
>      `is.finite' and `is.infinite' return a vector of the same length
>      as `x', indicating which elements are finite or not.
> is.finite() of a list seems to return a vector of the length of the list, 
but with value FALSE if any list element isn't finite.  Is this intended?

That is not the pattern, and the real pattern *is* intentional.  All
non-numeric vectors are not finite:

> is.finite(list(1,2,3))

Although a list is a generic vector, it is not a numeric vector.

I'll add that comment to the help page.

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