rp.normal | R Documentation |
This function plots a histogram of a sample of data and creates a panel which controls the mean and standard deviation of the normal distribution which is fitted to the data and displayed on the plot.
rp.normal(y, ylab = deparse(substitute(y)), panel.plot = TRUE, hscale = NA, vscale = hscale)
y |
a vector of data. |
ylab |
a character variable used for the histogram axis label. |
panel.plot |
a logical parameter which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE). If the plot is to be placed inside the panel then the tkrplot library is required. |
hscale, vscale |
scaling parameters for the size of the plot when |
The interactive controls allow a normal density curve to be added to the histogram, with doublebuttons used to control the values of the normal mean and standard deviation. The fitted normal density based on the sample mean and standard deviation can also be displayed.
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
## Not run: y <- rnorm(50, mean = 10, sd = 0.5) rp.normal(y) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.