Re: [R] How to test for NULL?

From: John Fox <jfox_at_mcmaster.ca>
Date: Thu, 24 Apr 2008 18:19:50 -0400

Dear Olivier,

You can use is.null().

apropos("null") finds is.null(), and help.search("null") turns up ?NULL, which documents is.null().

I hope this helps,
 John



John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox

> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-
> project.org] On Behalf Of Olivier Lefevre
> Sent: April-24-08 5:19 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] How to test for NULL?
>
> x == NULL returns logical(0) instead of FALSE or TRUE as you might
> expect
> and I cannot find the right way to write this test in R.
>
> Thanks in advance for any hint,
>
> -- O.L.
>
> ______________________________________________
> R-help_at_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.



R-help_at_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. Received on Thu 24 Apr 2008 - 22:28:26 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 Apr 2008 - 22:30:34 GMT.

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

list of date sections of archive