plotDist: plot a density function over a histogram

Description Usage Arguments Examples

Description

plot a density function over a histogram

Usage

1
2
3
plotDist(x = NULL, dfunc, args = list(), bins = 20, n = 1500,
  type = "irregular", xname = "<U+03C7>", xlab = xname,
  ylab = NULL, xlim = NULL, color = "#f45342CC", size = 2, ...)

Arguments

x

the data

dfunc

The name of a density function (ie, dnorm, dt, etc)

args

list of the additional argument of the function, ie, list(mu = 0, sigma = 1)

bins

defaults to 20

n

the number of x values to be evaluated in the superimposed density curve. Defaults to 1500.

type

defaults to "irregular" using the binning method described in plotPost. Otherwise, "equal".

xname

character; argument of the function in func, the name of the x axis

xlab

label of the x-axis

ylab

label of the y-axis

xlim

restrict the range of the function

color

the color of the line. defaults to "red"

size

the size of the line. defaults to 2

...

Additional arguments to stat_function()

Examples

1
plotDist(dnorm, from = -8 to = 8)

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.