Re: [R] NULL or NA for missing function arguments?

From: Brahm, David <>
Date: Mon 16 Oct 2006 - 21:06:44 GMT

Hans-Peter <> wrote:
> I am troubled by the use of NULL or NA to indicate
> missing/non-specified function arguments.

I suggest using NULL for arguments which are vectors or lists of unspecified length, and NA for "scalars" (arguments whose length should always be one, such as na.rm). I rarely use missing arguments, as they are harder to pass down to other functions. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 17 07:29:34 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 16 Oct 2006 - 22:30:11 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.