plot.disc | R Documentation |
Class disc
is used to represent an arbitrary
univariate discrete distribution with a finite number of support
points.
Function disc
creates an object of class disc
, given
the support points and probability values at these points.
Function plot.disc
plots the discrete distribution.
## S3 method for class 'disc'
plot(
x,
type = c("pdf", "cdf"),
add = FALSE,
col = 4,
lwd = 1,
ylim,
xlab = "",
ylab = "Probability",
...
)
x |
an object of class |
type |
plot its pdf or cdf. |
add |
add the plot or not. |
col |
colour to be used. |
lwd , ylim , xlab , ylab |
graphical parameters. |
... |
arguments passed on to function |
Yong Wang <yongwang@auckland.ac.nz>
disc
, cnm
, cnmms
.
plot(disc(pt=c(0,4), pr=c(0.3,0.7)))
plot(disc(rnorm(5), 1:5))
for(i in 1:5)
plot(disc(rnorm(5), 1:5), type="cdf", add=(i>1), xlim=c(-3,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.