Learn R Programming

campfin (version 1.0.11)

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, ...)

Value

A data frame with a new na_flag logical variable.

Arguments

data

A data frame to flag.

...

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

Examples

Run this code
flag_na(dplyr::starwars, hair_color)

Run the code above in your browser using DataLab