Learn R Programming

rutifier (version 1.0.4)

validate_rut: Validate RUT

Description

Validates a Chilean RUT. The input must be a character string in one of the following formats: RUT with dots and hyphen (Ex. '12.345.678-9'), RUT without dots but with hyphen (Ex. '12345678-9') or RUT without dots and hyphen (Ex. '123456789')

Usage

validate_rut(rut)

Arguments

rut

Character str

Value

Returs TRUE if RUT is valid, else it will return FALSE

Examples

Run this code
# NOT RUN {
validate_rut('123456789')
validate_rut('12345678-9')
validate_rut('12.345.678-9')
# }

Run the code above in your browser using DataLab