| fetch_norman | R Documentation |
This function interacts with the Norman Network Database System (NDS) API. It allows the user to pass a vector of values (e.g., multiple CAS numbers or NSIDs). It iterates through each value, performs the API request, and aggregates the results into a named list.
fetch_norman(
module,
parameter,
values,
page = NULL,
format = "json",
verbose = TRUE
)
module |
A character string specifying the database module. Allowed values:
|
parameter |
A character string specifying the search parameter.
The allowed parameters depend on the selected
Parameter Descriptions:
|
values |
A character or numeric value corresponding to the chosen |
page |
(Optional) Integer or character. The page number for pagination.
If |
format |
A character string specifying the output format.
Allowed values: |
verbose |
Logical. If TRUE, prints progress messages to the console. Defaults to TRUE. |
If format = "json": A list or data frame (parsed JSON).
If format = "xml": A raw character string (XML content).
A named list where each element's name corresponds to the search value and the content is the data returned by the API. If a request fails, the element will contain an error message or NULL.
## Not run:
# Define multiple CAS numbers
cas_list <- c("3380-34-5", "1490-04-6")
# Fetch data for all values
results <- fetch_norman(
module = "susdat",
parameter = "casrn",
values = cas_list
)
# Access specific result
triclosan_data <- results[["3380-34-5"]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.