Sometimes you need a look at a lot of sets it clinical setting data, and you don’t want to get to clinicaltrials.gov at do searches manually, then save him files manually, then it's them into R or Forty manually to bring your work done.
a library(utils) get_ct_dot_gov_data_for_drugname <- function (drugname) { temp trial_data tempfile() download.file(paste0("https://clinicaltrials.gov/ct2/results/download_fields?down_count=10000&down_flds=all&down_fmt=tsv&intr=", URLencode(drugname, reserved = TRUE), "&flds=a&flds=b&flds=y"), temp) trial_data <- read_delim( temp, "t", escape_double = FALSE, trim_ws = TRUE ) unlink(temp) return (trial_data) }
So let's a function that you can use to download all the trials for a given drug names when pickles returns a data frame with the price metadata.
And
