View source: R/add_chemtable.R
CAS.checksum | R Documentation |
Chemical abstracts services registry numbers (CAS-RN) include a final digit as a "checksum" to test for validity (that is, that the number has not been corrupted).
CAS.checksum(CAS.string)
CAS.string |
A character string of three numbers separated by two dashes |
The check digit (final number) is calculated by working from right to left, starting with the second to last digit of the CAS-RN. We multiply each digit by an increasing digit (1, 2, 3...) and sum as we work from right to left. The check digit should equal the final digit of the sum.
logical (TRUE if final digit of CAS is consistent with other digits)
John Wambaugh
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.