Determines whether or not an IMO number is in the correct format. IMO numbers should have 7 digits with a check digit at the end.

calcTestIMO(IMO, correctFlag = "Correct", incorrectFlag = "Incorrect")

Arguments

IMO

IMO number (vector of numericals or strings)

correctFlag

Output indicator for rows where the IMO Number is in the correct format

incorrectFlag

Output indicator for rows where the IMO Number is not in the correct format

Value

IMO_number_flag, a factorized vector containing either the value of correctFlag or incorrectFlag, depending on the correctness of the IMO number

Examples

calcTestIMO(IMO=c(899046900,0,9394935))
#> [1] Incorrect Incorrect Correct #> Levels: Correct Incorrect