gtoxCode2CASN: Convert chemical code to CAS Registry Number

View source: R/gtoxCode2CASN.R

gtoxCode2CASNR Documentation

Convert chemical code to CAS Registry Number

Description

gtoxCode2CASN takes a code and converts it CAS Registry Number.

Usage

gtoxCode2CASN(code)

Arguments

code

Character of length 1, a chemical code

Details

The function checks for the validity of the CAS Registry Number. Also, the ToxCast data includes chemcials for which there is no CASRN. The convention for these chemicals is to give them a CASRN as NOCAS_chid; the code for these compounds is CNOCASchid. The function handles the NOCAS compounds as they are stored in the database, as shown in the exmaple below.

Value

A CAS Registry Number.

Examples

gtoxCode2CASN("C80057")
gtoxCode2CASN("C09812420") ## Invalid CASRN will give a warning
gtoxCode2CASN("CNOCAS0015") ## The underscore is reinserted for NOCAS codes


philipmorrisintl/GladiaTOX documentation built on Aug. 27, 2023, 9:07 p.m.