na_check: An internal function to check for NAs in columns after a join

View source: R/Apply_Lookups.R

na_checkR Documentation

An internal function to check for NAs in columns after a join

Description

An internal function to check for NAs in columns after a join

Usage

na_check(data, input_var, output_var, lookup_file, missing_file = NULL)

Arguments

data

A data frame

input_var

The var(s) that had been used to join

output_var

The var(s) that result from the join

lookup_file

The file used in the join

missing_file

Filename to output any unmatched variables for easy of processing

Details

This function is intended to catch gaps in lookup tables and to alert the developer before they can come into use. The core intent is to throw an error message that, if needed, will guide the developer to the file they need to update and the rows they need to add.

Value

None. Instead the function raises an error if there are NAs

Examples

na_check(data,
  input_var=by,
  output_var=add_var,
  lookup_file=lookup_file)


CSISdefense/csis360 documentation built on Feb. 1, 2025, 1:22 p.m.