View source: R/forestsearch_methods.R
| plot.forestsearch | R Documentation |
Dispatches to plot_sg_results for Kaplan-Meier curves,
hazard-ratio forest plots, or combined panels.
## S3 method for class 'forestsearch'
plot(
x,
type = c("combined", "km", "forest", "summary"),
outcome.name = "Y",
event.name = "Event",
treat.name = "Treat",
...
)
x |
A |
type |
Character. Type of plot:
|
outcome.name |
Character. Name of time-to-event column.
Default: |
event.name |
Character. Name of event indicator column.
Default: |
treat.name |
Character. Name of treatment column.
Default: |
... |
Additional arguments passed to |
Invisibly returns the plot result from
plot_sg_results.
plot_sg_results for full control over appearance,
plot_sg_weighted_km for weighted KM curves,
plot_subgroup_results_forestplot for publication-ready
forest plots.
## Not run:
fs <- forestsearch(df.analysis = mydata, ...)
# Combined KM + forest plot (default)
plot(fs)
# KM curves only
plot(fs, type = "km")
# Forest plot only
plot(fs, type = "forest")
# With non-standard column names
plot(fs, type = "km",
outcome.name = "os_months",
event.name = "os_event",
treat.name = "treatment")
# With custom labels
plot(fs, sg0_name = "High Risk", sg1_name = "Standard Risk",
treat_labels = c("0" = "Placebo", "1" = "Active Drug"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.