ctrdata
is a package for aggregating and analysing data on clinical
studies, and for obtaining documents, from public trial registers
Package ctrdata
retrieves trial data and stores it in a database
collection. The connection is specified using nodbi
, which allows to
use different database backends in an identical way.
A database connection object is specified once and then can be used as
parameter con
in subsequent calls of ctrdata
functions.
Specifying collection = "<my trial data collection's name>"
indicates the table in the database that package ctrdata
should use.
Database | Connection object |
SQLite | dbc <- nodbi::src_sqlite(dbname = "my_db", collection = "my_coll") |
DuckDB | dbc <- nodbi::src_duckdb(dbname = "my_db", collection = "my_coll") |
MongoDB | dbc <- nodbi::src_mongo(db = "my_db", collection = "my_coll") |
PostgreSQL | dbc <- nodbi::src_postgres(dbname = "my_db"); dbc[["collection"]] <- "my_coll" |
ctrGenerateQueries (generate from simple user input specific queries for registers EUCTR, CTIS, CTGOV2 and ISRCTN), ctrOpenSearchPagesInBrowser (open queries in browser), see script (automatically copy user search in any register to clipboard), see ctrdata-registers for details on registers and how to search, ctrLoadQueryIntoDb (load trial records found with query into database collection).
ctrShowOneTrial (show widget to explore structure, fields and data of a trial), dbFindFields (find names of fields of interest in trial records in a collection), dbGetFieldsIntoDf (create a data frame with fields of interest and calculated trial concepts from collection), ctrdata-trial-concepts (calculate pre-defined trial concepts for every register), dbFindIdsUniqueTrials (get de-duplicated identifiers of clinical trials' records to subset a data frame).
dfTrials2Long (convert fields with nested elements into long format), dfName2Value (get values for variable(s) of interest), ctrdata-trial-concepts (calculate pre-defined trial concepts for every register).
Ralf Herold ralf.herold@mailbox.org
Useful links: