🧠cols_with_void(): Detect Columns Containing Void Values
Source:R/cols_with_void.R
cols_with_void.Rd
Scan a data.frame or tibble and identify columns that contain any "void" values.
Void values include NA
, NULL
, and ""
, which can be toggled via parameters.
Usage
cols_with_void(
data,
include_na = TRUE,
include_null = TRUE,
include_empty_str = TRUE,
return_names = TRUE
)
Examples
df <- data.frame(name = c("A", "", "C"), score = c(1, NA, 3), id = 1:3)
cols_with_void(df)
#> [1] "name" "score"
cols_with_void(df, return_names = FALSE)
#> name score id
#> TRUE TRUE FALSE