powered by
Checks that specified columns contain no NA values.
lock_no_na(.data, ..., .strict = FALSE)
Invisibly returns .data (for piping).
.data
A data frame.
Column names (unquoted) to check. If empty, checks all columns.
If TRUE, error on failure. If FALSE (default), warn.
TRUE
FALSE
df <- data.frame(id = 1:3, x = c("a", NA, "c")) lock_no_na(df, id) lock_no_na(df, x) # warns
Run the code above in your browser using DataLab