powered by
TRUE if x is missing or if length(x) is 0.
x
length(x)
missing0(x)
logical: TRUE if x is
logical
missing or if length(x) is 0.
missing
a formal argument as for missing
Spencer Graves
Only makes sense called from within another function
tstFn <- function(x)missing0(x) # missing stopifnot( all.equal(tstFn(), TRUE) ) # length 0 stopifnot( all.equal(tstFn(logical()), TRUE) ) # supplied stopifnot( all.equal(tstFn(1), FALSE) )
Run the code above in your browser using DataLab