Reads in a .txt file for data validation. Checks the number of files located in each directory supplied via the column file_path. If the total number of files exceeds the file_number_error value, the function produces an error. If the total number of files exceeds 50% of the file_number_error value the function produces a warning. Otherwise the function passes.

check_file_number(
  filename = "DSbulkUploadR_input.xlsx",
  path = getwd(),
  sheet_name,
  file_number_error = 500
)

Arguments

filename

String. Input file to check. Defaults to "DSbulkdUploadR_input.xlsx"

path

String. Path to the file. Defaults to the current working directory.

sheet_name

String. Name of the excel sheet to check.

file_number_error

Integer. Maximum allowable number of files. Defaults to 500.

Value

NULL (invisibly)

Examples

if (FALSE) { # \dontrun{
check_file_number("test_file.txt")
} # }