ctrShowOneTrial {ctrdata} | R Documentation |
Show full structure and all data of a trial
Description
If used interactively, the function shows a widget of all data in the trial
as a tree of field names and values. The widget opens in the default browser.
Fields names and values can be search and selected. Selected fields can be
copied to the clipboard for use with function dbGetFieldsIntoDf.
The trial is retrieved with ctrLoadQueryIntoDb if no database
con
is provided or if the trial is not in database con
.
For use in a Shiny app, see output and render functions in source code
here.
Usage
ctrShowOneTrial(identifier = NULL, con = NULL)
Arguments
identifier |
A trial identifier string |
con |
A database connection object, created with
|
Details
This is the widget for CTIS trial 2022-501142-30-00:
Value
Invisibly, the trial data for constructing an HTML widget.
Examples
dbc <- nodbi::src_sqlite(
dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
collection = "my_trials",
flags = RSQLite::SQLITE_RO)
# get sample of identifiers of trials in database
sample(dbFindIdsUniqueTrials(con = dbc), 5L)
# all such identifiers work
id <- "2014-003556-31"
id <- "2014-003556-31-SE"
id <- "76463425"
id <- "ISRCTN76463425"
id <- "NCT03431558"
id <- "2022-501142-30-00"
# note these ids also work with
# ctrGetQueryUrl(url = id) and
# ctrLoadQueryIntoDb(queryterm = id, ...)
# show widget for user to explore and search content as well as to
# select fields of interest and to click on "Copy names of selected
# fields to clipboard..." to use them with dbGetFieldsIntoDf()
ctrShowOneTrial(identifier = id, con = dbc)
[Package ctrdata version 1.24.0 Index]