Write complete textual information for one or multiple survival analysis results in a text file.
write_survival(
...,
file,
label = NULL,
p_precision = 3,
hr_precision = 2,
time_precision = 1,
include_end_separator = FALSE,
timespan_unit = c("days", "months", "years")
)
Results generated by analyse_survival
,
or analyse_multivariate
, or lists of such objects
A connection, or a character string naming the file to print to.
(see cat
)
A label describing the result, or a vector of the same size as results in ... (will then be mapped 1:1)
Precision with which to print floating point values
Boolean: Append "\n---\n" as separator? Comes handy if printing multiple results following each other
Unit for time spans: "days", "months" or "years"
None (invisible NULL).
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
.