Passing missing argument from function to function in R
问题 I’ve learned that it’s common practice to use optional arguments in function and check them with missing() (e.g. as discussed in SO 22024082) In this example round0 is the optional argument (I know, round0 could be defined as logical). foo = function(a, round0) { a = a * pi if(!missing(round0)) round(a) else a } But what if I call this function from another function, how can I pass “missing”? bar = function(b) { if(b > 10) round1=T foo(b, round1) } If b < 10 then round1 in bar() is not