write_survival: Print the essentials of a SurvivalAnalysisUnivariateResult.

Description Usage Arguments Details Value

Description

Write complete textual information for one or multiple survival analysis results in a text file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 analyse_survival, or analyse_multivariate, or lists of such objects

file

A connection, or a character string naming the file to print to. (see cat)

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).


survivalAnalysis documentation built on Feb. 11, 2022, 5:07 p.m.