identify_nonvalid_ids_flagged: Identify Non-Valid IDs in a Dataframe Based on Reference IDs...

View source: R/check_timci_quality.R

identify_nonvalid_ids_flaggedR Documentation

Identify Non-Valid IDs in a Dataframe Based on Reference IDs (TIMCI-specific)

Description

This function identifies non-valid IDs in a dataframe by comparing them with reference IDs from another dataframe. It is specifically designed for TIMCI data quality checks.

Usage

identify_nonvalid_ids_flagged(df1, col_id1, df2, col_id2)

Arguments

df1

A dataframe containing the data to be checked.

col_id1

The name of the column containing IDs in the df1 dataframe.

df2

A reference dataframe used for comparison.

col_id2

The name of the column containing reference IDs in the df2 dataframe.

Value

A list containing two dataframes:

Non-Valid IDs Dataframe

A dataframe containing rows with non-valid IDs and related dates, grouped in relevant columns.

Flagged Dataframe

A dataframe similar to df1 with an additional column indicating if each ID is flagged as non-valid (1) or not (0).


Thaliehln/timci documentation built on April 8, 2024, 3:38 p.m.