R - missing(): check if argument is missing

26 Aug 2017

test <- function(x=20){
   return(missing(x))
}
test()
# [1] TRUE
test(5)
# [1] FALSE

viewed on http://www.rfunction.com

[ R  function  logic  ]