geom_prob: Show probabilities as area under curve

Description Usage Arguments Examples

View source: R/utils.R

Description

A function that let's us draw area under curve, and with option to annotate plot with P(from < X < to).

Usage

1
geom_prob(from = -Inf, to = Inf, digits = 3, annotate = FALSE, ...)

Arguments

from

Left end-point of interval

to

right end-point of interval

digits

number of digits to include when printing probability

annotate

logical. If FALSE (default), the probability is not shown on plot.

Examples

1
2
3
4
X <- Normal()

#plot_pdf(X) + geom_prob(to = -0.645)
#plot_pdf(X) + geom_prob(from = -0.645, to = 0.1)

alexpghayes/distributions documentation built on April 8, 2021, 5:55 a.m.