extr_chem_info: Query Chemical Information from IUPAC Names

View source: R/extr_pubchem.R

extr_chem_infoR Documentation

Query Chemical Information from IUPAC Names

Description

This function takes a vector of IUPAC names and queries the PubChem database (using the webchem package) to obtain the corresponding CASRN and CID for each compound. It reshapes the resulting data, ensuring that each compound has a unique row with the CID, CASRN, and additional chemical properties.

Usage

extr_chem_info(iupac_names, verbose = TRUE)

Arguments

iupac_names

A character vector of IUPAC names. These are standardized names of chemical compounds that will be used to search in the PubChem database.

verbose

A logical value indicating whether to print detailed messages. Default is TRUE.

Value

A data frame with phisio-chemical information on the queried compounds, including but not limited to:

iupac_name

The IUPAC name of the compound.

cid

The PubChem Compound Identifier (CID).

isomeric_smiles

The SMILES string (Simplified Molecular Input Line Entry System).

Examples


# Example with formaldehyde and aflatoxin
extr_chem_info(iupac_names = c("Formaldehyde", "Aflatoxin B1"))


extractox documentation built on April 4, 2025, 2:30 a.m.