Learn R Programming

ctrdata (version 1.22.0)

f.primaryEndpointDescription: Calculate details of a primary endpoint of a study

Description

Trial concept calculated: full description of the primary endpoint, concatenating with " == " its title, description, time frame of assessment. The details vary by register. The text description can be used for identifying trials of interest or for analysing trends in primary endpoints, which among the set of all endpoints are most often used for determining the number of participants sought for the study.

Usage

f.primaryEndpointDescription(df = NULL)

Value

data frame with columns `_id` and `.primaryEndpointDescription`, which is a list (that is, one or more items in one vector per row; the background is that some trials have several endpoints as primary).

Arguments

df

data frame such as from dbGetFieldsIntoDf. If `NULL`, prints fields needed in `df` for calculating this trial concept, which can be used with dbGetFieldsIntoDf.

Examples

Run this code
# fields needed
f.primaryEndpointDescription()

# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
  dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
  collection = "my_trials", flags = RSQLite::SQLITE_RO
)
trialsDf <- dbGetFieldsIntoDf(
  calculate = "f.primaryEndpointDescription",
  con = dbc
)
trialsDf

Run the code above in your browser using DataLab