plot_dist_density: Plot probability ditribution

Description Usage Arguments Examples

View source: R/plotting.R

Description

Plot probability ditribution

Usage

1
2
3
4
5
plot_dist_density(dist, xmin = NULL, xmax = NULL, area = NULL,
  tails = FALSE, line_opts = list(), area_opts = list(), n = 101, ...)

plot_dist_density_p(dist, xmin = NULL, xmax = NULL, p = NULL,
  tails = FALSE, line_opts = list(), area_opts = list(), n = 101, ...)

Arguments

dist

Distribution name. Used for functions pdist, ddist, qdist.

xmin

Minimum value on the x-axis scale

xmax

Maximum value on the x-axis scale

area

numeric vector of length 2. Minimum and maximum values of an area under the curve to shade.

tails

logical. Shade areas in the tails

line_opts

list. Arguments passed to geom_line.

area_opts

list. Arguments passed to geom_ribbon.

n

Number of points to interpolate over

...

Arguments passed to the distribution functions.

p

Probability area to shade.

Examples

1
2
3
4
plot_dist_density("norm", -4, 4, area = c(-2, 2))
plot_dist_density("norm", -4, 4, area = c(-2, 2), tails = TRUE)
plot_dist_density_p("norm", -4, 4, p = 0.95)
plot_dist_density_p("norm", -4, 4, p = 0.95, tails = TRUE)

jrnold/ShinyIntroStats documentation built on May 19, 2019, 11:55 p.m.