FDA-class: An S4 class to represent FDA objects

Description Value Slots See Also Examples

Description

new("FDA") will instatiate an object of class FDA which holds attributes and methods for useful for accessing the openFDA API

Value

An object of a class FDA.

Slots

url

Base url. Default = "https://api.fda.gov/".

apikey

String of API key from openFDA API

endpointfront

String of API access point. This will vary by different classess. For example, the Drug class will have "drug" as the endpointfront value.

endpointback

String of API access point. This will vary by different classess. For example, the Drug class will have a variety of options based on the listSF. Specifically "event" may be an option.

searchfield

String of search field provided by open FDA. This will vary by different classess.

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
drug1 <- new("FDA", apikey="Sd8Jfad834FDS")

## Not run: 
  drugnorun <- new("FDA")

## End(Not run)

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