powered by
NA
Return an empty numeric if all elements are NA.
empty_vector_if_na(x)
An empty numeric if all elements of x are NA, otherwise x.
numeric
x
(numeric) vector.
x <- c(NA, NA, NA) # Internal function - empty_vector_if_na
Run the code above in your browser using DataLab