Drug-class: An S4 class to represent Drug objects

Description Value Slots See Also Examples

Description

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

Value

An object of a class Drug

Slots

aeTab

data.frame object of Adverse Events.

prodTab

data.frame object of Product Information

ndcTab

data.frame object of NDC information

reTab

data.frame object of Recall Enforcement

ndc

Numeric ndc value. This will be converted later using the ndcToString method into Obj@ndcquery value.

ndcquery

String of ndc value converted using ndcToString.

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("Drug", apikey="Sd8Jfad834FDS")

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

## End(Not run)

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