View source: R/kmplotting_helpers.R
| add_legends | R Documentation |
Adds legends for Cox model, log-rank test, and arms to a Kaplan-Meier plot.
add_legends(
dfcount,
show.cox,
cox.cex,
put.legend.cox,
show.logrank,
logrank.cex,
put.legend.lr,
show_arm_legend,
arms,
col.1,
col.0,
ltys,
lwds,
arm.cex,
put.legend.arms
)
dfcount |
List with results, typically output from a survival analysis function. Should contain elements such as |
show.cox |
Logical; show Cox legend. |
cox.cex |
Numeric; Cox legend size. |
put.legend.cox |
Character; Cox legend position (e.g., "topright"). |
show.logrank |
Logical; show logrank legend. |
logrank.cex |
Numeric; logrank legend size. |
put.legend.lr |
Character; logrank legend position (e.g., "topleft"). |
show_arm_legend |
Logical; show arm legend. |
arms |
Character vector of arm labels. |
col.1 |
Color for group 1. |
col.0 |
Color for group 0. |
ltys |
Line types. |
lwds |
Line widths. |
arm.cex |
Numeric; arm legend size. |
put.legend.arms |
Character; arm legend position (e.g., "left"). |
Invisibly returns NULL. Used for plotting side effects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.