Re: [Rd] Is missingness always passed on?

2019-10-01 Thread Bertram, Alexander via R-devel
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 _

Re: [Rd] Is missingness always passed on?

2019-10-01 Thread Bertram, Alexander via R-devel
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

Re: [Rd] some questions about R internal SEXP types

2020-09-08 Thread Bertram, Alexander via R-devel
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

Re: [Rd] 1954 from NA

2021-05-24 Thread Bertram, Alexander via R-devel
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

Re: [Rd] 1954 from NA

2021-05-24 Thread Bertram, Alexander via R-devel
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