From hongooi at microsoft.com  Tue Jun  6 18:50:34 2017
From: hongooi at microsoft.com (Hong Ooi)
Date: Tue, 6 Jun 2017 16:50:34 +0000
Subject: [Rd] Unexpected interaction between missing() and a blank expression
Message-ID: <HK2P15301MB0083C322D8EB5606878CFC60A6CB0@HK2P15301MB0083.APCP153.PROD.OUTLOOK.COM>

This is something I came across just now:

f <- function(x) missing(x)
z <- quote(expr=)

f(z)
# TRUE

The object z contains the equivalent of a missing function argument. Another method for generating a missing arg would be alist(a=)$a .

Should f(z) return TRUE in this case? I interpret missing() as checking whether the parent function call had a value supplied for the given argument. Here, I have supplied an argument (z), so I would expect f to return FALSE.



[Rd] Unexpected interaction between missing() and a blank expression
Hong Ooi