Description Usage Arguments Details Value Author(s) Examples
Retrieve recall data from the DigitalGov.gov Recall API
1 2 3 4 5 |
query |
A character string that will be used in search recall data. The API executes approximate matching (e.g., so “choke” will also return “choking”. |
organization |
A character vector naming one or more federal agencies, by abbreviation. One of “CPSC”, “FDA”, “NHTSA”, or “USDA”. |
start_date |
A character string containing the start date of a recall in YYYY-MM-DD format. |
end_date |
A character string containing the end date of a recall in YYYY-MM-DD format. |
food_type |
An optional character string containing either “food” or “drug” to narrow results only to food or drug recalls. |
upc |
An optional character string containing a product UPC code. |
make |
For vehicle recalls, a character string naming a vehicle or equipment make. |
model |
For vehicle recalls, a character string naming a vehicle or equipment model. |
year |
For vehicle recalls, a character string naming a vehicle or equipment year. |
code |
For vehicle recalls, a character string naming an NHTSA code. One of “E”, “V”, “I”, “T”, “T”, “C”, or “X”. |
page |
A numeric value or character string specifying a specific page of results to return (between 1 and 20). Setting |
per_page |
A numeric value or character string specifying a page size for results (between 1 and 50). This is overridden to 50 if |
sort |
A character string specifying whether to sort result by relevance (“rel”; the default) or date (“date”). |
... |
Other arguments. Currently ignored. |
The particular objects returned will vary in structure depending on type of recall. As a result, attempting to build a rectangular dataset from different types of recall data may prove complicated. It is recommended to retrieve recalls of only one type if the goal is to rbind
the list of results into a matrix or data.frame.
A list containing one or more objects of class “recall”.
Thomas J. Leeper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.