trimzero: Trimzero

Description Usage Arguments Details Value Author(s)

View source: R/Utility.R

Description

This function removes initial zeroes from CAS numbers.

Usage

1
trimzero(x, y)

Arguments

x

aCAS number. Defult is none

y

A dummy argument This helps with the removal of the zeros inteh CAS number

Details

Each CAS number has three parts, separated by underscores. The first part is up to seven digits, but optionally, leading zeroes are omitted. For example, formaldehyde may be either "0000050_00_0" or "50_00_0". SHEDS needs to match CAS numbers across input files, and trimzero is used to ensure matching even when the input files follow different conventions.

Value

y a shorter CAS number. If the initial part is all zero (as in "0000000_12_3"), one zero is left in the first part (that is, "0_12_3" for this example).

Author(s)

Kristin Isaacs, Graham Glen


HumanExposure/SHEDSDevel documentation built on Oct. 30, 2019, 6:49 p.m.