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

breast cancer download throwing an subscript out of bounds error #14

Open
deathinvenice opened this issue Mar 23, 2017 · 1 comment
Open

Comments

@deathinvenice
Copy link

deathinvenice commented Mar 23, 2017

Hello,

An issue came up. When I use this query the function breaks and returns a subscript out of bounds error.

breast_list <- clinicaltrials_download(query=c('cond=breast cancer', 'intr=drug','locn=USA'),
count = NULL, include_results = TRUE,
include_textblocks=TRUE)

Is it related to volume? It is 5K+ trials Im trying to retrieve.

titaniumtroop added a commit to titaniumtroop/rclinicaltrials that referenced this issue Sep 19, 2017
Fix for Issue sachsmc#12:
gather_results expected complete values for baseline/measure_list in
XML file, which isn’t necessarily there. Trapped missing value.

Fixed Issue sachsmc#14: In clinicaltrials_download, number of downloaded files
can be shorter than the list of NCT numbers submitted in a tframe
(e.g., where bad NCT IDs are introduced from an external source). The
expected number of files was a list the same length as the submitted
NCT IDs in tframe. Omitted missing values.
@titaniumtroop
Copy link
Contributor

The line throwing this error is line 56 in gather_results.R:

measures <- parsed[["//baseline/measure_list"]]

An NCT ID throwing this error is NCT01602016. There are no baseline measures because the study was terminated early. So, the attempt to use an array reference with the parsed dataframe fails with the subscript out of bounds error, as that subscript doesn't exist. I'm submitting a pull request #17 to trap this error.

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