extr_casrn_from_cid: Retrieve CASRN for PubChem CIDs
Description
This function retrieves the CASRN for a given set of PubChem Compound Identifiers (CID).
It queries PubChem through the webchem package and extracts the CASRN from
the depositor-supplied synonyms.
Usage
extr_casrn_from_cid(pubchem_ids, verbose = TRUE)
Value
A data frame containing the CID, CASRN, and IUPAC name of the compound.
The returned data frame includes three columns:
CID
The PubChem Compound Identifier.
casrn
The corresponding CASRN of the compound.
iupac_name
The IUPAC name of the compound.
query
The pubchem_id queried.
Arguments
pubchem_ids
A numeric vector of PubChem CIDs. These are unique identifiers
for chemical compounds in the PubChem database.
verbose
A logical value indicating whether to print detailed messages.
Default is TRUE.