Learn R Programming

httk (version 2.6.0)

cas_id_check: CAS number format check function

Description

This function checks whether the CAS/CARN chemical identifier follows the anticipated format of XXXXXXX-YY-Z (i.e. 2-7 digits, 2 digits, and 1 digit, respectively).

Usage

cas_id_check(cas)

Value

Logical output (TRUE or FALSE) indicating whether the character string(s) provided match the anticipated format for a CAS/CASRN chemical identifier.

Arguments

cas

A character string, or vector of character strings, indicating CAS/CASRN number.