printValidationError.Rd
This function validates a line against a specified format pattern and prints/logs detailed errors for each field that does not match the expected format.
printValidationError(
line,
validation,
file = NA,
line_number = NA,
log_file = NULL
)
A character vector representing the line to be validated.
(Optional) The name of the file containing the line (default is NA).
(Optional) The line number within the file (default is NA).
(Optional) A character vector specifying a file where error messages are logged. If NULL, messages are only printed to the console.
NULL (This function is called for its side effect of printing/logging messages.)
printValidationError ("NS-20220510-001 68.37261219N 18.69783 1195.186 O", "data.txt", 5, "log/validation.txt", "log/warnings.txt")
#> Error: $ operator is invalid for atomic vectors