Re: [Rd] is.finite confusion

From: Vladimir Dergachev <vdergachev_at_rcgardis.com>
Date: Wed, 23 May 2007 16:01:26 -0400

On Wednesday 23 May 2007 1:29 pm, Prof Brian Ripley wrote:
> 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?

I read the manpage if that is what you are talking about.

The particular thing I was attempting to do is to convert all entries that are not values to NULL before storing the result in the database. From my point of view string value was perfectly finite and my code worked with a data.frame I had because it happened to have factors in it.

Yes, I easily concede that since I know about it now I am not likely to make the same mistake again. Just was trying (politely) to be of help to other users.

                             best

                                 Vladimir Dergachev

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 23 May 2007 - 20:07:31 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 - 05:33:40 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.