extr_chem_info {extractox} | R 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"))