Description Usage Arguments Value See Also Examples
extractFDA(Obj, endpointtype, query)
for classes other than Other
will extract tables based on the query
. The Other
class only has one
API endpoint therefore doesn't require endpointtype (i.e. extractFDA(Obj, endpointtype, query)
)
1 2 3 4 5 6 7 | extractFDA(Obj, endpointtype, query, ...)
## S4 method for signature 'FDA'
extractFDA(Obj, endpointtype, query, ...)
## S4 method for signature 'Other'
extractFDA(Obj, endpointtype, query, ...)
|
Obj |
An Obj of class FDA or child thereof. |
endpointtype |
The endpoint after the class endpoint. For example,
If the |
query |
string of query to access FDA API. For example,
If we want to do |
... |
Passed down to searchlist within the function |
An object of a class data.frame
https://open.fda.gov/apis/drug/ndc/ for the actual
API description from openFDA. jsonlite
for accessing API.
1 2 3 4 5 6 7 8 9 | drug1 <- new("Drug", apikey="Y3CgaZj67AotB7b4XLhzHJTY7oBWKUC3u1fYulw8")
drug1tab <- extractFDA(drug1, "event", "receivedate:[20040101+TO+20081231]&limit=1")
## Not run:
drugnorun <- extractFDA("Food")
drugnorun <- extractFDA(drug1, "random") # not a valid access endpoint
drugnorun <- extractFDA(drug1, "event", "randomquery") # not a valid query
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.