[Rd] is.finite confusion

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 23 19:29:27 CEST 2007


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



More information about the R-devel mailing list