Eduard Szöcs

Data in Environmental Science and Eco(toxico-)logy

webchem v0.0.2 is out.

A new version of the webchem package is available on CRAN.

Allan Woods database

The biggest visible change is the implementation of allanwood(), which queries data from Allan Woods Compendium of Pesticides. You can query his database via the common name or the CAS:

require(webchem)
allanwood('Fluazinam', type = 'commonname')
## $cname
## [1] "Fluazinam"
## 
## $status
## [1] "ISO 1750 (published)"
## 
## $pref_iupac_name
## [1] "3-chloro-N-[3-chloro-2,6-dinitro-4-(trifluoromethyl)phenyl]-5-(trifluoromethyl)pyridin-2-amine"
## 
## $iupac_name
## [1] "3-chloro-N-(3-chloro-5-trifluoromethyl-2-pyridyl)-α,α,α-trifluoro-2,6-dinitro-p-toluidine"
## 
## $cas
## [1] "79622-59-6"
## 
## $formula
## [1] "C13H4Cl2F6N4O4"
## 
## $activity
## [1] "fungicides (pyridine fungicides)"
## 
## $inchikey
## [1] "UZCGKGPEKUCDTF-UHFFFAOYSA-N"
## 
## $inch
## [1] "InChI=1S/C13H4Cl2F6N4O4/c14-6-1-4(12(16,17)18)3-22-11(6)23-9-7(24(26)27)2-5(13(19,20)21)8(15)10(9)25(28)29/h1-3H,(H,22,23)"
allanwood('79622-59-6', type = 'cas')$cname
## [1] "fluazinam"

Other changes

All other changes are under the hood:

  • fixing problems with NA handling
  • the functions now return NA if the server is not reachable
  • misc bug fixes
  • Addition of unit tests
  • Improved documentation
  • Some function now check the user input.
Written on August 19, 2015