On Fri, May 9, 2014 at 10:42 PM, Hadley Wickham <h.wick...@gmail.com> wrote:
> Beware of the is.* functions:
>
> * is.object() does not test the usual definition of objects
> * is.vector() does not test the usual definition of vectors
> * is.numeric() does not work the same way as is.character() or is.integer()
> * is.Date() doesn't exist
> * is.nan() doesn't return TRUE for some NaNs

 Can we have an "is.is" function that tells us these things?

 > is.is(is.object)
   [1] FALSE
    Warning: is.object() does not test the usual definition of objects

 > is.is(is.is)
   [1] TRUE

 For further exploration, demo("is.things") creates a handy "is.ALL"
function that outputs the result of running a lot of is.X functions on
its argument.

Barry

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to