Learn R Programming

campfin (version 1.0.7)

flag_na: Flag Missing Values With New Column

Description

This function uses dplyr::mutate() to create a new na_flag logical variable with TRUE values for any record missing any value in the selected columns.

Usage

flag_na(data, ...)

Arguments

data

A data frame to flag.

...

Arguments passed to dplyr::select() (needs to be at least dplyr::everything()).

Value

A data frame with a new na_flag logical variable.

Examples

Run this code
# NOT RUN {
flag_na(dplyr::starwars, hair_color)
# }

Run the code above in your browser using DataLab