Skip to content

Commit

Permalink
Documented new argument for downloading latest only
Browse files Browse the repository at this point in the history
  • Loading branch information
bgcarlisle committed Nov 28, 2023
1 parent b58cfc4 commit 112f43e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cthist
Title: Clinical Trial Registry History
Version: 2.1.4
Version: 2.1.5
Authors@R:
person("Benjamin Gregory", "Carlisle", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-8975-0649"))
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# cthist 2.1.5

* Added argument `latest` to function `clinicaltrials_gov_download` to
allow downloading only the latest version for many clinical trial
registry entries

---

# cthist 2.1.4

* Fix bug in which start date would erroneously return NA in some
Expand Down
11 changes: 10 additions & 1 deletion man/clinicaltrials_gov_download.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/testthat/clinicaltrials_gov_download_latest.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test_that("ClinicalTrials.gov history entries mass-download correctly", {
filename <- tempfile()
if (file.exists(filename)) {
file.remove(filename)
}
result <- clinicaltrials_gov_download(
c("NCT02329873"), filename, TRUE, TRUE
)
expect_equal(
result == TRUE || result == FALSE,
TRUE
)
})

0 comments on commit 112f43e

Please sign in to comment.