Description Usage Arguments Value Examples
Function to compile HR-table.
1 2 3 4 |
data |
A data frame that contains the baseline (BL) data (one row per participant). |
this.outcome |
A text string as input for survival::coxph, e.g.,
"Surv(Follow_up_Years, Event_Death)" (incl. the quotes). This string will
be passed to coxph as the left-side of the model equation with
|
info |
A data frame with specifications for the HR-table. (See Examples below.) |
sign.digits |
Digits used for parameter estimates |
sign.digits.HR |
Digits used for hazard ratios and conf. intervals |
pvalue.digits |
Digits used for p-values |
pvalue.cutoff |
Cutoff for changing p-values to simply 'smaller than', e.g., p < 0.001 |
test.input |
Whether the input is tested for logical consistency. Warning: testing is not
comprehensive. Setting |
factor.level.bullet |
The character to be prepended to factor levels (listing). The default
is |
less.than.character |
The character to be prepended to the cutoff-value for the p-values (e.g., '< 0.001'). The default
is |
linebreak.tag |
Can be used to insert a linebreak-command in the table headers to bring the counts to a new line.
The default is |
An R character-matrix containing the compiled table information.
1 2 3 4 5 | ## Not run:
HRtable(data = example_data, info = example_variables,
this.outcome = "Surv(Follow_up_Years, Event_Death)", test.input = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.