Learn R Programming

hint (version 0.1-0)

add.distr: Add Distributions to a Plot

Description

This function will add one or more distributions or hypothesis tests to an existing plot.

Usage

add.distr(..., cols = "blue", test.cols = "red")

Arguments

...
One or more distributions or objects of class hint.test.
cols
A character string vector naming the colours of the distributions. If length(cols) is less than the number of distributions, the colours will be recycled. Defaults to "blue".
test.cols
A character string vector naming the colours to use for the regions in which the cumulative probability of the hypothesis test was derived (if it exists). If length(test.cols) is less than the number of distributions, the colours will be recy

Value

  • Plots to the current device.

See Also

plotDistr, plot.hint.test.

Examples

Run this code
dd <- dhint(25, 12, 9)
plotDistr(dd)
dd1 <- dhint(12, 4, 7)
dd2 <- dhint(8, 4, 2)
add.distr(dd1, dd2, cols = c("blue", "darkgreen"))

Run the code above in your browser using DataLab