Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading multiple trials? #32

Open
wolfemd opened this issue Mar 13, 2018 · 1 comment
Open

Downloading multiple trials? #32

wolfemd opened this issue Mar 13, 2018 · 1 comment

Comments

@wolfemd
Copy link

wolfemd commented Mar 13, 2018

Hi there,

I'm a cassava base user. Most of my analysis is done in R. I'm trying to integrate direct DB calls into my pipeline using your package. I was wondering what you recommended or planned for downloading multiple trials?

Below is my solution, which works but is VERY VERY slow (hours or days) and often times out... in contrast direct calls to download the same data using the GUI / web interface for the DB takes minutes/hours.

library(tidyverse); library(brapi)
db<-ba_db()$cassavabase
trials_1<-db %>% 
    ba_studies_search(programDbId = "162") %>% 
    mutate(seasons=as.numeric(seasons)) %>% 
    filter(seasons >= 2015,
           seasons <= 2016) %>% 
    mutate(studyDbId=as.character(studyDbId),
           data=map(studyDbId,~ba_studies_table(db,.)))
@c5sire
Copy link
Contributor

c5sire commented Mar 13, 2018

Hi,

let me check. I will come back to you in a couple of days or so.

Best,

Reinhard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants