Learn R Programming

tern (version 0.9.8)

empty_vector_if_na: 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)

Value

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

Arguments

x

(numeric)
vector.

Examples

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

Run the code above in your browser using DataLab