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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of Olivier Lefevre > Sent: April-24-08 5:19 PM > To: [EMAIL PROTECTED] > 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@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@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.