Re: [Rd] is.finite confusion

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 23 May 2007 18:29:27 +0100 (BST)

No, because it is carefully documented to do this, and people rely on it working as documented. (Did you do the homework the posting guide asked for?) What harm came out of learning that the values were not finite?

On Wed, 23 May 2007, Vladimir Dergachev wrote:

>
> I have recently made a silly screwup by applying is.finite() to a
> character vector:
>
>> is.finite(c("a", "b"))
> [1] FALSE FALSE
>
> This does work with factors of course (as they are integer underneath)
>
> I wonder if a fix could be put in so that it either reports an error when
> applied to a character vector - or, perhaps better, act as is.na()

What way is that? It acts in the same way, as I understand the help pages.

>
> thank you
>
> Vladimir Dergachev
> PS test on R 2.5.0, 2.3.1

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 23 May 2007 - 17:31:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 May 2007 - 03:33:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.