Plot a distribution
This function displays a histogram, a box plot, a strip chart and a density curve on the same plot.
mf_distr(x, nbins, bw)
x
: a numeric variablenbins
: number of bins in the histogrambw
: bandwidth of the density curveThe number of bins of the histogram and the bandwidth of the density curve are (invisibly) returned in a list.
(mf_distr(rnorm(1000))) mf_distr(rbeta(1000, .6, 7)) mf_distr(rbeta(1000, 5, .6))