plot.dca | R Documentation |
Plot DCA Object with ggplot
## S3 method for class 'dca' plot( x, type = NULL, smooth = FALSE, span = 0.2, style = c("color", "bw"), show_ggplot_code = FALSE, ... )
x |
dca object created with |
type |
indicates type of plot to produce. Must be one of
|
smooth |
Logical indicator whether plot will be smooth with
|
span |
when |
style |
Must be one of |
show_ggplot_code |
Logical indicating whether to print ggplot2 code used to
create figure. Default is |
... |
not used |
a ggplot2 object
Daniel D Sjoberg
dca()
, net_intervention_avoided()
, standardized_net_benefit()
, as_tibble.dca()
p <- dca(cancer ~ cancerpredmarker, data = df_binary) %>% plot(smooth = TRUE, show_ggplot_code = TRUE) p # change the line colors p + ggplot2::scale_color_manual(values = c('black', 'grey', 'purple'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.