Learn R Programming

vindecodr (version 0.1.1)

valid_vin_format: Check VIN Length and Characters

Description

Checks that VINs are 17 characters long and will optionally check that disallowed characters (I, O, Q) are not present.

Usage

valid_vin_format(vin, check_chars = FALSE)

Arguments

vin

A character. Should be a properly formatted Vehicle Identification Number. Wildcards (e.g., '*') are acceptable.

check_chars

Logical. Should an error be thrown if the VIN contains illegal characters?

Value

Logical.

Examples

Run this code
# NOT RUN {
# Random VIN
valid_vin_format("3VWLL7AJ9BM053541")
# With wild card
valid_vin_format("3VWLL7AJ9BM*53541")
# }

Run the code above in your browser using DataLab