enforce_custom_na: Redefine 'NA' value for a dataset.

View source: R/enforce_custom_na.R

enforce_custom_naR Documentation

Redefine NA value for a dataset.

Description

Redefine NA value for a dataset.

Usage

enforce_custom_na(data, col_schema)

Arguments

data

A data.frame object

col_schema

A col_schema from a schema object

Value

A data.frame

Examples


# create custom NA filter
example_na_custom <- example_na |>
  tidyr::replace_na(
    list("wages" = -999)
  )

example_na_expanded_custom <- enforce_custom_na(
  data = example_na_custom,
  col_schema = list(
    "wages" = list(
      dtype = "dbl",
      na_value = -999
     )
   )
 )


tidysynthesis documentation built on March 17, 2026, 1:06 a.m.