extr_chem_info | R Documentation |
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.
extr_chem_info(iupac_names, verbose = TRUE)
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. |
A data frame with phisio-chemical information on the queried compounds, including but not limited to:
The IUPAC name of the compound.
The PubChem Compound Identifier (CID).
The SMILES string (Simplified Molecular Input Line Entry System).
# Example with formaldehyde and aflatoxin
extr_chem_info(iupac_names = c("Formaldehyde", "Aflatoxin B1"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.