R/input_validation_functions.R
check_content_units.Rd
Reads in a .txt file for data validation. Uses the NPS Unit Service API to check that the content_units column contains valid NPS unit codes. If invalid content units are encountered, the function throws an error and prints a list of the invalid units to the console. If all units are valid, the test passes.
check_content_units(
path = getwd(),
filename = "DSbulkUploadR_input.xlsx",
sheet_name
)
NULL (invisibly)
if (FALSE) { # \dontrun{
check_content_units("test_file.txt")} # }