powered by
A vector is empty if all(is.na(x)) with a special case for length(x) == 0.
all(is.na(x))
length(x) == 0
allNA( x, expected = FALSE, len0 = FALSE, nThread = getOption("hutilscpp.nThread", 1L) )
A vector. Only atomic vectors are supported.
TRUE | FALSE Whether it is expected that x is empty. If TRUE the function will be marginally faster if x is empty but likely slower if not.
TRUE | FALSE
x
TRUE
The result if length(x) == 0.
Number of threads to use (only applicable if expected is TRUE)
expected
allNA(c(NA, NA)) allNA(c(NA, NA, 1))
Run the code above in your browser using DataLab