websearch_comptox: Search and retrieve substance information from...

View source: R/online.r

websearch_comptoxR Documentation

Search and retrieve substance information from https://comptox.epa.gov/dashboard


[Experimental] Search https://comptox.epa.gov/dashboard for substances and their chemico-physical properties and meta-information.


  identifierTypes = c("chemical_name", "CASRN", "INCHIKEY", "dtxsid"),
  downloadItems = c("DTXCID", "CASRN", "INCHIKEY", "IUPAC_NAME", "SMILES",
  massError = 0,
  timeout = 300,
  verify_ssl = getOption("ECOTOXr_verify_ssl"),



A vector of characters where each element is a substance descriptor (any of the selected identifierTypes) you wish to query.


Substance identifiers for searching CompTox. Only used when inputType is set to "IDENTIFIER".


Type of input used for searching CompTox. See usage section for valid entries.


Output fields of CompTox data for requested substances


Error tolerance when searching for substances based on their monoisotopic mass. Only used for inputType = "MASS".


Time in seconds (default is 300 secs), that the routine will wait for the download link to get ready. It will throw an error if it takes longer than the specified timeout.


When set to FALSE the SSL certificate of the host (EPA) is not verified. Can also be set as option: options(ECOTOXr_verify_ssl = TRUE). Default is TRUE.


Arguments passed on to httr::GET requests.


The CompTox Chemicals Dashboard is a freely accessible on-line U.S. EPA database. It contains information on physico-chemical properties, environmental fate and transport, exposure, usage, in vivo toxicity, and in vitro bioassay of a wide range of substances.

The function described here to search and retrieve records from the on-line database is experimental. This is because this feature is not formally supported by the EPA, and it may break in future incarnations of the on-line database. The function forms an interface between R and the CompTox website and is therefore limited by the restrictions documented there.


Returns a named list of dplyr::tibbles containing the search results for the requested output tables and fields. Results are unpolished and ‘as is’ returned by EPA's web service.


Pepijn de Vries


Official US EPA CompTox website: https://comptox.epa.gov/dashboard/

Williams, A.J., Grulke, C.M., Edwards, J., McEachran, A.D., Mansouri, K, Baker, N.C., Patlewicz, G., Shah, I., Wambaugh, J.F., Judson, R.S. & Richard, A.M. (2017), The CompTox Chemistry Dashboard: a community data resource for environmental chemistry. J Cheminform, 9(61) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s13321-017-0247-6")}

See Also

Other search-functions: search_ecotox(), websearch_ecotox()


## Not run: 
## search for substance name 'benzene' and CAS registration number 108-88-3
## on https://comptox.epa.gov/:
comptox_results <- websearch_comptox(c("benzene", "108-88-3"))

## search for substances with monoisotopic mass of 100+/-5:
comptox_results2 <- websearch_comptox("100", inputType = "MASS", massError = 5)

## End(Not run)

ECOTOXr documentation built on Oct. 10, 2023, 1:05 a.m.