Skip to contents
library(ClinicoPath)
data("histopathology")
dplyr::glimpse(histopathology)
ClinicoPath::survival(
    data = histopathology,
    elapsedtime = "OverallTime",
    tint = TRUE,
    dxdate = "SurgeryDate",
    fudate = "LastFollowUpDate",
    explanatory = "LVI",
    outcome = "Outcome",
    outcomeLevel = NULL,
    dod = NULL,
    dooc = NULL,
    awd = NULL,
    awod = NULL,
    timetypedata = "ymdhms",
    sc = TRUE,
    ce = TRUE,
    ch = TRUE
    )
overall_survival <- ClinicoPath::survival(
    data = histopathology,
    elapsedtime = "OverallTime",
    tint = TRUE,
    dxdate = "SurgeryDate",
    fudate = "LastFollowUpDate",
    explanatory = "LVI",
    outcome = "Outcome",
    outcomeLevel = NULL,
    dod = NULL,
    dooc = NULL,
    awd = NULL,
    awod = NULL,
    timetypedata = "ymdhms",
    sc = TRUE,
    ce = TRUE,
    ch = TRUE
    )
ls(overall_survival)
overall_survival$tCoxtext2
overall_survival$survTableSummary
overall_survival$survTable
overall_survival$subtitle
overall_survival$plot3
overall_survival$plot2
overall_survival$plot
overall_survival$medianTable
overall_survival$medianSummary
overall_survival$coxTable
overall_survival$coxTable$asDF
overall_survival$coxSummary
overall_survival$plot
# Tip: Save a high-resolution PNG
# overall_survival$plot$saveAs("overall_survival.png")
# Convert to TIFF if needed for journals:
# img <- png::readPNG("overall_survival.png")
# tiff::writeTIFF(what = img, where = "overall_survival.tiff", compression = "none")

Notes

  • This vignette shows how to call the same analysis from R that you access in jamovi’s GUI.
  • Keep event coding and time units consistent with your dataset.