Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.cas

Format numbers as CAS numbers


Description

This function attempts to format numeric (or character) vectors as character vectors of CAS numbers. If they cannot be converted to CAS format or don't pass is.cas, NA is returned

Usage

as.cas(x)

Arguments

x

numeric vector, or character vector of CAS numbers missing the hyphens

Value

character vector of valid CAS numbers

See Also

Examples

x = c(58082, 123456, "hexenol")
as.cas(x)

webchem

Chemical Information from the Web

v1.1.1
MIT + file LICENSE
Authors
Eduard Szöcs [aut], Robert Allaway [ctb], Daniel Muench [ctb], Johannes Ranke [ctb], Andreas Scharmüller [ctb], Eric R Scott [ctb], Jan Stanstrup [ctb], João Vitor F Cavalcante [ctb], Gordon Getzinger [ctb], Tamás Stirling [ctb, cre]
Initial release
2021-02-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.