is_na: Are values missing?

View source: R/is_na.R

is_naR Documentation

Are values missing?

Description

Returns TRUE or FALSE depending on whether the value in x are missing. Compared to is.na(), it follows the tidyverse size principles, so that length(is_na(df)) equals nrow(df).

Usage

is_na(x)

Arguments

x

A vector

Value

A logical vector with same size as x.

Examples

is_na(c(NA, 1, NA))

# A row of a data frame is missing if all its values are missing.
df <- data.frame(x = c(NA, 2, 3), y = c(NA, NA, 3))
is_na(df)

tidyverse/funs documentation built on May 21, 2022, 12:12 p.m.