1

Using openFDA package, I have this code:

# devtools::install_github("ropenhealth/openfda")
library("openfda")

drugs = fda_query("/drug/event.json") %>%
  fda_api_key("MY_KEY") %>%
  fda_count("patient.drug.medicinalproduct.exact") %>% 
  fda_exec()

So, I get a list of drugs with a count for each line (fda_count). I'd like to add to the data.frame "drugs" also a column with the corresponding company name to the drug. How can I add the data from "patient.drug.openfda.manufacturer_name.exact" as third column?

zx8754
  • 52,746
  • 12
  • 114
  • 209
  • Please provide a Reproducible Example so we know what you are trying to do! http://stackoverflow.com/a/5963610/6802027 – Dan Slone Feb 28 '17 at 20:55
  • I've read the entire documentation of R openFDA and as I can say now, it is not possible what I'm trying to do. There is no other way than use the same query several times (with filters) and then consolidate all queries in a data.frame or matrix. –  Mar 03 '17 at 06:06

0 Answers0