clt_anim: Animating the Results of 'clt()'

Description Usage Arguments Details

View source: R/clt_anim.R

Description

clt_anim() animates the output of clt(). This is an experimental function and may not work in many cases. It creates ggplot histograms of the z-scores for each value of N, showing how N converges to a normal distribution as it increases.

Usage

1
2
clt_anim(data = NULL, ci = 1.96, xlim = c(-4, 4), compile = FALSE,
  fps = 4, filename = "clt.gif")

Arguments

ci

The confidence interval you would like to evaluate at. Default is 1.96.

xlim

A vector of the left and right x limits for the generated plots. For certain distributions limits should be adjusted to more of the domain.

compile

If TRUE, the function will compile into a gif then delete temp images, if FALSE will output raw images to the working directory.

fps

The number of frames per second for the gif.

filename

The output name of the .gif file.

N

The data frame to create a gif from.

Details

NOTE: This function requires ImageMagick and uses the magick package.


dfsnow/clt documentation built on May 29, 2019, 12:01 p.m.