all_na: Check if vector only has NA values

Description Usage Arguments Value Examples

View source: R/all_na.R

Description

Check if all values in a vector are NA.

Usage

1
all_na(x)

Arguments

x

A vector or data frame.

Value

Logical, TRUE if x has only NA values, FALSE if x has at least one non-missing value.

Examples

1
2
3
4
5
6
7
x <- c(NA, NA, NA)
y <- c(1, NA, NA)

all_na(x)
all_na(y)
all_na(data.frame(x, y))
all_na(list(x, y))

strengejacke/sjmisc documentation built on March 30, 2020, 5:39 a.m.