Hi,

I am troubled by the use of NULL or NA to indicate
missing/non-specified function arguments.

In the R code that I have looked at, it seems that both forms are used
(NULL seems to be used more often though). Sometimes both variants are
in the same declaration, e.g.

format.default <-
    function(x, trim = FALSE, digits = NULL, nsmall = 0,
             justify = c("left", "right", "centre", "none"),
             width = NULL, na.encode = TRUE, scientific = NA,
             big.mark = "", big.interval = 3,
             small.mark = "", small.interval = 5, decimal.mark = ".",
             zero.print = NULL, ...)

Is there a right way? And if both forms are used, how do I know which
one is right?

Thanks a lot and best regards,
Hans-Peter

______________________________________________
R-help@stat.math.ethz.ch 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