View source: R/f_primaryEndpointResults.R
f.primaryEndpointResults | R Documentation |
Trial concept calculated: Calculates several results-related elements of the primary analysis of the primary endpoint. Requires loading results-related information. For CTIS and ISRCTN, such information is not available in structured format. Recommended to be combined with .controlType, .sampleSize etc. for analyses.
f.primaryEndpointResults(df = NULL)
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. |
data frame with columns '_id' and new columns: '.primaryEndpointFirstPvalue' (discarding any inequality indicator, e.g. <=), '.primaryEndpointFirstPmethod' (normalised string, e.g. chisquared), '.primaryEndpointFirstPsize' (number included in test, across assignment groups).
# fields needed
f.primaryEndpointResults()
## Not run:
# 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.primaryEndpointResults",
con = dbc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.