write_survival {survivalAnalysis} | R Documentation |
Print the essentials of a SurvivalAnalysisUnivariateResult.
Description
Write complete textual information for one or multiple survival analysis results in a text file.
Usage
write_survival(
...,
file,
label = NULL,
p_precision = 3,
hr_precision = 2,
time_precision = 1,
include_end_separator = FALSE,
timespan_unit = c("days", "months", "years")
)
Arguments
... |
Results generated by |
file |
A connection, or a character string naming the file to print to.
(see |
label |
A label describing the result, or a vector of the same size as results in ... (will then be mapped 1:1) |
p_precision , hr_precision , time_precision |
Precision with which to print floating point values |
include_end_separator |
Boolean: Append "\n—\n" as separator? Comes handy if printing multiple results following each other |
timespan_unit |
Unit for time spans: "days", "months" or "years" |
Details
As write_survival takes potentially multiple objects, it cannot
return its input in a cleanly defined way.
You can still elegantly combine write_survival
in a pipe followed by
kaplan_meier_plot
or kaplan_meier_grid
for a single input object if you apply the
tee pipe operator %T>%
in front of write_survival
.
Value
None (invisible NULL).