powered by
Scan a data.frame or tibble and identify rows that contain any "void" values. Void values include NA, NULL, and empty strings "" (toggle via flags).
NA
NULL
""
rows_with_void( data, include_na = TRUE, include_null = TRUE, include_empty_str = TRUE )
A logical vector of length nrow(data) indicating whether each row contains at least one void value.
nrow(data)
A data.frame or tibble.
Logical. Detect NA if TRUE. Default: TRUE.
Logical. Detect NULL if TRUE. Default: TRUE.
Logical. Detect empty strings "" if TRUE. Default: TRUE.
df <- data.frame(id = 1:3, name = c("A", "", "C"), score = c(10, NA, 20)) rows_with_void(df) df[rows_with_void(df), ]
Run the code above in your browser using DataLab