empty_vector_if_na: Return an empty numeric if all elements are 'NA'.

View source: R/utils.R

empty_vector_if_naR Documentation

Return an empty numeric if all elements are NA.

Description

Return an empty numeric if all elements are NA.

Usage

empty_vector_if_na(x)

Arguments

x

(numeric)
vector.

Value

An empty numeric if all elements of x are NA, otherwise x.

Examples

x <- c(NA, NA, NA)
# Internal function - empty_vector_if_na

tern documentation built on Sept. 24, 2024, 9:06 a.m.