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
.
write_survival_rates(
...,
file,
time_points,
label = NULL,
writer = write.csv,
writer_args = list(),
percentage_decimal_places = 1,
time_precision = 0,
timespan_unit = c("days", "months", "years")
)
None (invisible NULL).
Results generated by analyse_survival
,
or lists of such objects
A connection, or a character string naming the file to print to.
(see cat
)
Time points to compute survival rate at
A label describing the result, or a vector of the same size as results in ... (will then be mapped 1:1). Recommended to distinguish result lines from multiple results in ...
A writer function such as write.csv
Parameters to pass to the writer function
Precision with which to print floating point values in their label form
Unit for time spans: "days", "months" or "years"