find_multiple_atcs: Find Multiple ATC Codes

View source: R/check_helpers.R

find_multiple_atcsR Documentation

Find Multiple ATC Codes

Description

This function checks if each package has a single ATC code. It counts the unique ATC codes for each package and raises an error if any package has more than one ATC code. It is used internally in the package to ensure data integrity. Function is for internal use for creating error messages in the package.

Usage

find_multiple_atcs(atc_col, package_col)

Arguments

atc_col

a character vector containing ATC codes.

package_col

an integer vector containing package identifiers corresponding to the ATC codes.

Value

invisible NULL if all packages have a single ATC code, otherwise raises an error with a message listing the packages that have multiple ATC codes.


piavat/PRE2DUP-R documentation built on June 11, 2025, 11:42 a.m.