lisfSF-methods: An S4 method to list Search Field for Each child Object of...

Description Usage Arguments Value See Also Examples

Description

listSF(Obj will search for search fields appropriate for the instantiated Obj.Users can use the search field outputted in extractFDA() to extract relevant information

Usage

1
2
3
4
5
6
7
listSF(Obj, endpoint, ...)

## S4 method for signature 'FDA'
listSF(Obj, endpoint, ...)

## S4 method for signature 'Other'
listSF(Obj, endpoint, ...)

Arguments

Obj

An Obj of class FDA or child thereof.

endpoint

string indicating the endpoint for the specific class. For example, for the class "Drug", the endpoint may be "event".

...

Passed down to searchlist within the function

Value

An object of a class Food

See Also

https://open.fda.gov/apis/drug/ndc/ for the actual API description from openFDA. jsonlite for accessing API.

Examples

1
2
3
4
5
6
7
8
drug1 <- new("Drug", apikey="Y3CgaZj67AotB7b4XLhzHJTY7oBWKUC3u1fYulw8")
drug1sf <- listSF(drug1, "event")

## Not run: 
  drug1sf <- listSF("Food")
  drug1sf <- listSF(drug1,"random") # there is no access point

## End(Not run)

ck2136/FDAopenR documentation built on Aug. 15, 2021, 3:43 a.m.