There is "missing with default" and "missing without default".
If an argument x is missing without a default, then missing(x) is true, if
you pass x to another function, it will pass the value of the "missing
argument". (which is different than simply being missing!)
If an argument x is missing _
The updated example was meant to read:
f1 <- function(x = NULL, y = NULL, z = NULL){
if(missing(x))
cat("f1: x is missing\n")
if(missing(y))
cat("f1: y is missing\n")
}
f2 <- function(x = NULL, y = NULL, z = NULL){
if(missing(z))
cat("f2: z is missing\n")
f1(x, y)
}
f2()
Ale
Hi Dan,
For what it's worth, Renjin requires LISTSXPs to hold either a LISTSXP or a
NULL, and this appears to be largely the case in practice based on running
tests for thousands of packages (including cross compiled C code). I can
only remember it being briefly an issue with the rlang package, bu
Dear Adrian,
I just wanted to pipe in and underscore Thomas' point: the payload bits of
IEEE 754 floating point values are no place to store data that you care
about or need to keep. That is not only related to the R APIs, but also how
processors handle floating point values and signaling and non-s
Dear Adrian,
SPSS and other packages handle this problem in a very similar way to what I
described: they store additional metadata for each variable. You can see
this in the way that SPSS organizes it's file format: each "variable" has
additional metadata that indicate how specific values of the va