Skip to content

Commit 6f76dd2

Browse files
committed
docs and pkgdown update
1 parent 3c99d8e commit 6f76dd2

16 files changed

+165
-310
lines changed

NEWS.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## Improvements
44
- When using `querytoupdate` for CTIS, set `ctishistory = TRUE` to create historic versions from previously downloaded trial record, see `vignette("ctrdata_summarise")`
5+
- `ctrGenerateQueries()` now also covers countries of trial conduct and now defaults to interventional trials with medicines
56
- Trial concept `f.trialObjectives()` improved with structured data from CTIS and EUCTR
6-
- `ctrGenerateQueries()` now also covers countries of trial conduct
77

8-
## Bug fix
9-
- Fix digesting marginal cases in notifications in `f.statusRecruitment()`
8+
## Bug fix
9+
- Fixed for `ISRCTN` API term mangling
10+
- Fixed digesting marginal cases in notifications in `f.statusRecruitment()`
11+
- Fixed `ctrGenerateQueries` to handle 'or' as needed for certain filters
1012

1113
# ctrdata 1.21.1
1214

R/ctrGenerateQueries.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
#' with EUCTR)
3030
#' @param completedAfter String that can be interpreted as date (does not work
3131
#' with EUCTR)
32+
#' @param onlyMedIntervTrials Logical, default \code{TRUE}, which indicates if
33+
#' queries should search only for medicine interventional clinical trial
3234
#' @param onlyWithResults Logical
33-
#' @param countries Vector of country names, two- or three-letter
34-
#' ISO 3166 codes
35+
#' @param countries Vector of country names, two- or three-letter ISO 3166 codes
3536
#'
3637
#' @returns Named vector of URLs for finding trials in the registers and as
3738
#' input to functions \link{ctrLoadQueryIntoDb} and

R/ctrdata-registers.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' Registers of the four clinical trial registers from which package
44
#' \link{ctrdata} can retrieve, aggregate and analyse protocol- and
5-
#' result-related information as well as documents, last updated 2025-04-06.
5+
#' result-related information as well as documents, last updated 2025-04-13.
66
#'
77
#' @section 1 - Overview:
88
#'
@@ -12,14 +12,14 @@
1212
#' to be added (can be loaded by `ctrdata`).
1313
#'
1414
#' - **CTIS**: The EU Clinical Trials Information System, launched in 2023,
15-
#' holds more than 8,700 publicly accessible clinical trials, including
15+
#' holds more than 8,900 publicly accessible clinical trials, including
1616
#' around 100 with results or a report (only as PDF files).
1717
#' _No results in a structured electronic format are foreseeably available_,
1818
#' thus `ctrdata` cannot load any CTIS results.
1919
#' (To automatically get CTIS search query URLs, see
2020
#' \ifelse{latex}{\out{\href{https://rfhb.github.io/ctrdata/\#id_2-script-to-automatically-copy-users-query-from-web-browser}{here}}}{\href{https://rfhb.github.io/ctrdata/#id_2-script-to-automatically-copy-users-query-from-web-browser}{here}})
2121
#'
22-
#' - **CTGOV2**: ClinicalTrials.gov holds more than 529,000 interventional and
22+
#' - **CTGOV2**: ClinicalTrials.gov holds more than 533,000 interventional and
2323
#' observational studies, including almost 66,000 interventional studies with
2424
#' results (can be loaded by `ctrdata`).
2525
#'
@@ -53,7 +53,7 @@
5353
#' | Expert / advanced search | \href{https://www.clinicaltrialsregister.eu/ctr-search/search}{link} | \href{https://clinicaltrials.gov/expert-search}{link} | \href{https://www.isrctn.com/editAdvancedSearch}{link} | \href{https://euclinicaltrials.eu/ctis-public/search}{link} |
5454
#' | Glossary / related information | \href{https://www.clinicaltrialsregister.eu/doc/EU_Clinical_Trials_Register_Glossary.pdf}{link} | \href{https://clinicaltrials.gov/study-basics/glossary}{link} | \href{https://www.who.int/clinical-trials-registry-platform/network/who-data-set}{link} | \href{https://accelerating-clinical-trials.europa.eu/}{link} |
5555
#' | FAQ, caveats, issues | \href{https://www.clinicaltrialsregister.eu/doc/EU_CTR_FAQ.pdf}{link} | \href{https://clinicaltrials.gov/policy/faq}{link}, \href{https://clinicaltrials.gov/about-site/selected-publications}{link} | \href{https://www.isrctn.com/page/faqs}{link} | \href{https://euclinicaltrials.eu/website-outages-and-system-releases/}{link} |
56-
#' | Data dictionaries / definitions / structure reference | \href{https://eudract.ema.europa.eu/result.html}{link} | \href{https://cdn.clinicaltrials.gov/documents/xsd/public.xsd}{link}, \href{https://clinicaltrials.gov/data-about-studies/study-data-structure}{link}, \href{https://cdn.clinicaltrials.gov/documents/tutorial/content/index.html}{link} | \href{https://www.isrctn.com/page/definitions}{link} | \href{https://www.ema.europa.eu/en/human-regulatory-overview/research-development/clinical-trials-human-medicines/clinical-trials-information-system-ctis-training-support}{link} (XLSX files) |
56+
#' | Data dictionaries / definitions / structure reference | \href{https://eudract.ema.europa.eu/result.html}{link}, \href{https://eudract.ema.europa.eu/docs/technical/EudraCT%20protocol%20related%20data%20dictionary.xls}{link}, \href{https://eudract.ema.europa.eu/docs/technical/V7_V8_Country_List_20210804.xlsx}{link} | \href{https://cdn.clinicaltrials.gov/documents/xsd/public.xsd}{link}, \href{https://clinicaltrials.gov/data-about-studies/study-data-structure}{link}, \href{https://cdn.clinicaltrials.gov/documents/tutorial/content/index.html}{link} | \href{https://www.isrctn.com/page/definitions}{link} | \href{https://www.ema.europa.eu/en/human-regulatory-overview/research-development/clinical-trials-human-medicines/clinical-trials-information-system-ctis-training-support}{link} (XLSX files) |
5757
#' | Example* | \ifelse{latex}{\out{\href{https://www.clinicaltrialsregister.eu/ctr-search/search?query=Infections\&age=newborn\&age=preterm-new-born-infants}{link}}}{\href{https://www.clinicaltrialsregister.eu/ctr-search/search?query=Infections&age=newborn&age=preterm-new-born-infants}{link}} | \ifelse{latex}{\out{\href{https://clinicaltrials.gov/search?ageRange=0M_1M\&cond=Infections\&aggFilters=studyType:int\&distance=50\&intr=Investigational+Agent}{link}}}{\href{https://clinicaltrials.gov/search?ageRange=0M_1M&cond=Infections&aggFilters=studyType:int&distance=50&intr=Investigational+Agent}{link}} | \ifelse{latex}{\out{\href{https://www.isrctn.com/search?q=\&filters=ageRange:Neonate,conditionCategory:Infections+and+Infestations\&searchType=advanced-search}{link}}}{\href{https://www.isrctn.com/search?q=&filters=ageRange:Neonate,conditionCategory:Infections+and+Infestations&searchType=advanced-search}{link}} | \ifelse{latex}{\out{\href{https://euclinicaltrials.eu/ctis-public/search\#searchCriteria={"containAll":"infection","containAny":"neonates","containNot":""}}{link}}}{\href{https://euclinicaltrials.eu/ctis-public/search#searchCriteria={"containAll":"infection","containAny":"neonates"}}{link}} |
5858
#'
5959
#' Some registers are expanding entered search terms using dictionaries

README.Rmd

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The package `ctrdata` provides functions for retrieving (downloading), aggregati
4646
- ClinicalTrials.gov ("CTGOV2", see [example](#workflow-ctgov-example))
4747
- ISRCTN Registry (https://www.isrctn.com/)
4848

49-
The motivation is to investigate the design and conduct of trials of interest, to describe their trends and availability for patients and to facilitate using their detailed results for research and meta-analyses. `ctrdata` is a package for the [R](https://www.r-project.org/) system, but other systems and tools can use the databases created with this package. This README was reviewed on 2025-04-02 for version 1.21.1.9000.
49+
The motivation is to investigate the design and conduct of trials of interest, to describe their trends and availability for patients and to facilitate using their detailed results for research and meta-analyses. `ctrdata` is a package for the [R](https://www.r-project.org/) system, but other systems and tools can use the databases created with this package. This README was reviewed on 2025-04-13 for version 1.21.1.9000.
5050

5151
## Main features
5252

@@ -637,46 +637,32 @@ unlink("./files-isrctn/", recursive = TRUE)
637637
```
638638

639639

640-
## Tests
640+
## Tests and coverage
641641

642642
See also [https://app.codecov.io/gh/rfhb/ctrdata/tree/master/R](https://app.codecov.io/gh/rfhb/ctrdata/tree/master/R)
643643

644644
```{r}
645645
tinytest::test_all()
646-
# test_ctrdata_duckdb_ctgov2.R.. 78 tests OK 48.7s
647-
# test_ctrdata_function_activesubstance.R 4 tests OK 1.3s
648-
# test_ctrdata_function_ctrgeneratequeries.R 14 tests OK 5ms
649-
# test_ctrdata_function_params.R 25 tests OK 1.0s
650-
# test_ctrdata_function_trial-concepts.R 80 tests OK 4.6s
651-
# test_ctrdata_function_various.R 67 tests OK 3.4s
652-
# test_ctrdata_postgres_ctgov2.R 50 tests OK 32.1s
653-
# test_ctrdata_sqlite_ctgov.R... 46 tests OK 28.9s
654-
# test_ctrdata_sqlite_ctgov2.R.. 50 tests OK 27.0s
655-
# test_ctrdata_sqlite_ctis.R.... 63 tests OK 56.9s
656-
# test_ctrdata_sqlite_euctr.R... 115 tests OK 46.3s
657-
# test_ctrdata_sqlite_isrctn.R.. 38 tests OK 10.6s
658-
# test_euctr_error_sample.R..... 8 tests OK 0.2s
659-
# All ok, 638 results (4m 21.4s)
660646
661647
covr::package_coverage(path = ".", type = "tests")
662-
# ctrdata Coverage: 94.30%
648+
# ctrdata Coverage: 94.69%
663649
# R/ctrShowOneTrial.R: 57.89%
664-
# R/ctrRerunQuery.R: 74.85%
665650
# R/zzz.R: 80.95%
666651
# R/dbGetFieldsIntoDf.R: 86.99%
667-
# R/util_functions.R: 89.86%
652+
# R/ctrRerunQuery.R: 89.18%
653+
# R/util_functions.R: 89.81%
668654
# R/ctrLoadQueryIntoDbEuctr.R: 90.08%
669655
# R/ctrFindActiveSubstanceSynonyms.R: 90.38%
670656
# R/ctrGetQueryUrl.R: 92.04%
671-
# R/ctrLoadQueryIntoDbIsrctn.R: 92.45%
672-
# R/ctrLoadQueryIntoDbCtgov2.R: 92.72%
657+
# R/ctrLoadQueryIntoDbCtgov2.R: 92.68%
658+
# R/ctrLoadQueryIntoDbIsrctn.R: 92.81%
673659
# R/dfMergeVariablesRelevel.R: 94.29%
674-
# R/ctrLoadQueryIntoDbCtis.R: 95.26%
660+
# R/ctrLoadQueryIntoDbCtis.R: 95.34%
675661
# R/dbFindFields.R: 95.88%
676662
# R/f_primaryEndpointResults.R: 96.00%
677-
# R/ctrLoadQueryIntoDb.R: 96.77%
678-
# R/ctrOpenSearchPagesInBrowser.R: 97.37%
679-
# R/ctrGenerateQueries.R: 97.51%
663+
# R/ctrLoadQueryIntoDb.R: 96.86%
664+
# R/ctrGenerateQueries.R: 97.31%
665+
# R/ctrOpenSearchPagesInBrowser.R: 97.40%
680666
# R/dbFindIdsUniqueTrials.R: 98.78%
681667
# R/f_numTestArmsSubstances.R: 98.92%
682668
# R/f_likelyPlatformTrial.R: 99.13%
@@ -710,11 +696,11 @@ covr::package_coverage(path = ".", type = "tests")
710696

711697
Implemented:
712698

713-
* ~~Retrieve previous versions of protocol- or results-related information. The challenges include, historic versions can only be retrieved one-by-one, do not include results, or are not in structured format. The functionality available with version 1.17.3 to the extent that is possible at this time, namely for protocol- and results-related information in CTGOV2, only~~
699+
* ~~Retrieve previous versions of protocol- or results-related information. The challenges include, historic versions can only be retrieved one-by-one, do not include results, or are not in structured format. The functionality available at this time, is to retrieve any version in CTGOV2, and to create a version when re-running a CTIS query and retrieving new data.~~
714700

715-
* ~~Canonical definitions, filters, calculations are in the works (since August 2023) for data mangling and analyses across registers, e.g. to define study population, identify interventional trials, calculate study duration; public collaboration on these canonical scripts will speed up harmonising analyses.~~
701+
* ~~Canonical definitions, filters, calculations are in the works (since August 2023, released in version 1.20.0) for data mangling and analyses across registers, e.g. to define study population, identify interventional trials, calculate study duration; public collaboration on these canonical scripts will speed up harmonising analyses.~~
716702

717-
* ~~Merge results-related fields retrieved from different registers, such as corresponding endpoints (work not yet started). The challenge is the incomplete congruency and different structure of data fields.~~
703+
* ~~Merge results-related fields retrieved from different registers, such as corresponding endpoints. The challenge is the incomplete congruency and different structure of data fields. This has largely been implemented as per the previous bullet point.~~
718704

719705

720706
## Acknowledgements

README.md

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interest, to describe their trends and availability for patients and to
3737
facilitate using their detailed results for research and meta-analyses.
3838
`ctrdata` is a package for the [R](https://www.r-project.org/) system,
3939
but other systems and tools can use the databases created with this
40-
package. This README was reviewed on 2025-04-02 for version 1.21.1.9000.
40+
package. This README was reviewed on 2025-04-13 for version 1.21.1.9000.
4141

4242
## Main features
4343

@@ -801,46 +801,32 @@ ctrLoadQueryIntoDb(
801801
# trial(s) already existed in ./files-ctis
802802
```
803803

804-
## Tests
804+
## Tests and coverage
805805

806806
See also <https://app.codecov.io/gh/rfhb/ctrdata/tree/master/R>
807807

808808
``` r
809809
tinytest::test_all()
810-
# test_ctrdata_duckdb_ctgov2.R.. 78 tests OK 48.7s
811-
# test_ctrdata_function_activesubstance.R 4 tests OK 1.3s
812-
# test_ctrdata_function_ctrgeneratequeries.R 14 tests OK 5ms
813-
# test_ctrdata_function_params.R 25 tests OK 1.0s
814-
# test_ctrdata_function_trial-concepts.R 80 tests OK 4.6s
815-
# test_ctrdata_function_various.R 67 tests OK 3.4s
816-
# test_ctrdata_postgres_ctgov2.R 50 tests OK 32.1s
817-
# test_ctrdata_sqlite_ctgov.R... 46 tests OK 28.9s
818-
# test_ctrdata_sqlite_ctgov2.R.. 50 tests OK 27.0s
819-
# test_ctrdata_sqlite_ctis.R.... 63 tests OK 56.9s
820-
# test_ctrdata_sqlite_euctr.R... 115 tests OK 46.3s
821-
# test_ctrdata_sqlite_isrctn.R.. 38 tests OK 10.6s
822-
# test_euctr_error_sample.R..... 8 tests OK 0.2s
823-
# All ok, 638 results (4m 21.4s)
824810

825811
covr::package_coverage(path = ".", type = "tests")
826-
# ctrdata Coverage: 94.30%
812+
# ctrdata Coverage: 94.69%
827813
# R/ctrShowOneTrial.R: 57.89%
828-
# R/ctrRerunQuery.R: 74.85%
829814
# R/zzz.R: 80.95%
830815
# R/dbGetFieldsIntoDf.R: 86.99%
831-
# R/util_functions.R: 89.86%
816+
# R/ctrRerunQuery.R: 89.18%
817+
# R/util_functions.R: 89.81%
832818
# R/ctrLoadQueryIntoDbEuctr.R: 90.08%
833819
# R/ctrFindActiveSubstanceSynonyms.R: 90.38%
834820
# R/ctrGetQueryUrl.R: 92.04%
835-
# R/ctrLoadQueryIntoDbIsrctn.R: 92.45%
836-
# R/ctrLoadQueryIntoDbCtgov2.R: 92.72%
821+
# R/ctrLoadQueryIntoDbCtgov2.R: 92.68%
822+
# R/ctrLoadQueryIntoDbIsrctn.R: 92.81%
837823
# R/dfMergeVariablesRelevel.R: 94.29%
838-
# R/ctrLoadQueryIntoDbCtis.R: 95.26%
824+
# R/ctrLoadQueryIntoDbCtis.R: 95.34%
839825
# R/dbFindFields.R: 95.88%
840826
# R/f_primaryEndpointResults.R: 96.00%
841-
# R/ctrLoadQueryIntoDb.R: 96.77%
842-
# R/ctrOpenSearchPagesInBrowser.R: 97.37%
843-
# R/ctrGenerateQueries.R: 97.51%
827+
# R/ctrLoadQueryIntoDb.R: 96.86%
828+
# R/ctrGenerateQueries.R: 97.31%
829+
# R/ctrOpenSearchPagesInBrowser.R: 97.40%
844830
# R/dbFindIdsUniqueTrials.R: 98.78%
845831
# R/f_numTestArmsSubstances.R: 98.92%
846832
# R/f_likelyPlatformTrial.R: 99.13%
@@ -879,19 +865,20 @@ Implemented:
879865
- ~~Retrieve previous versions of protocol- or results-related
880866
information. The challenges include, historic versions can only be
881867
retrieved one-by-one, do not include results, or are not in structured
882-
format. The functionality available with version 1.17.3 to the extent
883-
that is possible at this time, namely for protocol- and
884-
results-related information in CTGOV2, only~~
868+
format. The functionality available at this time, is to retrieve any
869+
version in CTGOV2, and to create a version when re-running a CTIS
870+
query and retrieving new data.~~
885871

886872
- ~~Canonical definitions, filters, calculations are in the works (since
887-
August 2023) for data mangling and analyses across registers, e.g. to
888-
define study population, identify interventional trials, calculate
889-
study duration; public collaboration on these canonical scripts will
890-
speed up harmonising analyses.~~
873+
August 2023, released in version 1.20.0) for data mangling and
874+
analyses across registers, e.g. to define study population, identify
875+
interventional trials, calculate study duration; public collaboration
876+
on these canonical scripts will speed up harmonising analyses.~~
891877

892878
- ~~Merge results-related fields retrieved from different registers,
893-
such as corresponding endpoints (work not yet started). The challenge
894-
is the incomplete congruency and different structure of data fields.~~
879+
such as corresponding endpoints. The challenge is the incomplete
880+
congruency and different structure of data fields. This has largely
881+
been implemented as per the previous bullet point.~~
895882

896883
## Acknowledgements
897884

cran-comments.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Test environments
22

3-
* local: R Under development (unstable) (2025-03-10 r87922) on aarch64-apple-darwin20 (ok)
3+
* local: R version 4.5.0 (2025-04-11) on aarch64-apple-darwin20 (ok)
44

5-
* Win-builder: R Under development (unstable); R version 4.3.3 (2024-02-29 ucrt) (2025-03-12 r87950 ucrt) (ok)
5+
* Win-builder: (ok)
66

7-
* macOS builder: r-release-macosx-arm64|4.4.2|macosx|macOS 13.3.1 (22E261) (ok)
7+
* macOS builder: r-release-macosx-arm64|4.4.2|macosx|macOS 13.3.1 (22E261)|Mac mini|Apple M1||en_US.UTF-8|macOS 11.3|clang-1403.0.22.14.1|GNU Fortran (GCC) 14.2.0 (ok)
88

99
* GitHub actions: windows-2022, r: 'release'; macOS-latest, r: 'release'; macOS-latest, r: 'oldrel'; ubuntu-latest, r: 'devel' (ok)
1010

@@ -16,11 +16,7 @@
1616

1717
## Submission reason
1818

19-
- Fix user-reported bug, unrelated to recent release
20-
21-
- Fix CRAN "NOTE installed size is 5.3Mb"
22-
23-
- Cannot fix CRAN "ERROR Installation failed. Flavor: r-devel-linux-x86_64-debian-gcc" because this is caused by "Error: ERROR: no permission to install to directory ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages’"
19+
- Several fixes of issues discovered in rare use cases
2420

2521

2622
## Reverse dependency checks

0 commit comments

Comments
 (0)