View source: R/ctrGenerateQueries.R
ctrGenerateQueries | R Documentation |
From high-level search terms provided by the user, generate specific queries for each registers with which ctrdata works, see ctrdata-registers. Search terms that are expanded to concepts such as from MeSH and MedDRA by the search implementations in registers include the 'intervention' and 'condition'. Logical operators only work with 'searchPhrase'.
ctrGenerateQueries(
searchPhrase = NULL,
condition = NULL,
intervention = NULL,
phase = NULL,
population = NULL,
recruitment = NULL,
startBefore = NULL,
startAfter = NULL,
completedBefore = NULL,
completedAfter = NULL,
onlyMedIntervTrials = TRUE,
onlyWithResults = FALSE,
countries = NULL
)
searchPhrase |
String with optional logical operators ("AND", "OR") that will be searched in selected fields of registers that can handle logical operators (general or title fields), should not include quotation marks |
condition |
String with condition / disease |
intervention |
String with intervention |
phase |
String, e.g. "phase 2" (note that "phase 2+3" is a specific category, not the union set of "phase 2" and "phase 3") |
population |
String, e.g. "P" (paediatric), "A" (adult), "P+A" (adult and paediatric), "E" (elderly), "P+A+E" participants can be recruited |
recruitment |
String, one of "ongoing", "completed", "other" ( which includes "ended early" but this cannot be searched; use trial concept f.statusRecruitment to identify this status) |
startBefore |
String that can be interpreted as date (for EUCTR, when trial was first registered) |
startAfter |
String that can be interpreted as date (for EUCTR, when trial was first registered) |
completedBefore |
String that can be interpreted as date (does not work with EUCTR) |
completedAfter |
String that can be interpreted as date (does not work with EUCTR) |
onlyMedIntervTrials |
Logical, default |
onlyWithResults |
Logical |
countries |
Vector of country names, two- or three-letter ISO 3166 codes |
Named vector of URLs for finding trials in the registers and as input to functions ctrLoadQueryIntoDb and ctrOpenSearchPagesInBrowser
urls <- ctrGenerateQueries(
intervention = "antibody",
phase = "phase 3",
startAfter = "2000-01-01")
# open queries in register web interface
sapply(urls, ctrOpenSearchPagesInBrowser)
urls <- ctrGenerateQueries(
searchPhrase = "antibody AND covid",
recruitment = "completed",
)
# count trials found
sapply(urls, ctrLoadQueryIntoDb, only.count = TRUE)
# load queries into database collection
# sapply(urls, ctrLoadQueryIntoDb, con = dbc)
# find research platform and platform trials
urls <- ctrGenerateQueries(
searchPhrase = paste0(
"basket OR platform OR umbrella OR master protocol OR ",
"multiarm OR multistage OR subprotocol OR substudy OR ",
"multi-arm OR multi-stage OR sub-protocol OR sub-study"),
startAfter = "01/31/2010",
countries = c("DE", "US", "United Kingdom"))
# open queries in register web interface
sapply(urls, ctrOpenSearchPagesInBrowser)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.