not_all_na: Evaluate if a vector is empty

Description Usage Arguments Value Examples

View source: R/not_all_na.R

Description

not_all_na takes a vector and checks whether at least one element is not an NA. This is particularly useful when selecting non_empty columns of a data frame or tibble.

Usage

1

Arguments

x

A vector to be evaluated.

Value

A logical value (TRUE or FALSE) that answers the question "is any element of the vector not an NA.

Examples

1
2
3
4
x1 <- c(0,1,NA,5)
not_all_na(x1)
x2 <- rep(NA, 5)
not_all_na(x2)

victoria-ramirez/expanded_slf documentation built on July 1, 2020, 12:15 a.m.