stat_auc | R Documentation |
Fill out area under the curve for a plotted PDF
stat_auc( mapping = NULL, data = NULL, geom = "auc", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, from = -Inf, to = Inf, annotate = FALSE, digits = 3, ... ) geom_auc( mapping = NULL, data = NULL, stat = "auc", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, from = -Inf, to = Inf, annotate = FALSE, digits = 3, ... )
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
geom |
The geometric object to use to display the data, either as a
|
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
from |
Left end-point of interval |
to |
Right end-point of interval |
annotate |
Should P() be added in the upper left corner as an annotation? Works also with a colour character, e.g., "red". |
digits |
Number of digits shown in annotation |
... |
Other arguments passed on to |
stat |
The statistical transformation to use on the data for this
layer, either as a |
N1 <- Normal() plot_pdf(N1) + geom_auc(to = -0.645) plot_pdf(N1) + geom_auc(from = -0.645, to = 0.1, annotate = TRUE) N2 <- Normal(0, c(1, 2)) plot_pdf(N2) + geom_auc(to = 0) plot_pdf(N2) + geom_auc(from = -2, to = 2, annotate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.