How to Apply the missing() Function in R (2 Examples)
In this tutorial, I’ll illustrate how to apply the missing function in the R programming language.
Introducing Example Data
f <- function(input) { # Create user-defined function return(missing(input)) } |
f <- function(input) { # Create user-defined function return(missing(input)) }
Example 1: Apply missing() Function without Formal Argument
f() # using missing function # [1] TRUE |
f() # using missing function # [1] TRUE
Example 2: Apply missing() Function with Formal Argument
f(input = 10) # using missing function # [1] FALSE |
f(input = 10) # using missing function # [1] FALSE