Skip to contents

Standardizes the keep_na argument into a named list keyed by column name. Accepts a scalar logical/character (applied to all cols), or a named list for per-column control.

  • FALSE: remove rows where the column is NA

  • TRUE or NA: keep NA values as-is

  • a character string (e.g. "Unknown"): recode NA to that level

Usage

check_keep_na(keep_na, cols = NA)

Arguments

keep_na

Logical, character, or named list

cols

Column names to apply the value to when scalar

Value

A named list