plot_pmf {psborrow2}R Documentation

Plot Probability Mass Function Values

Description

Plot Probability Mass Function Values

Usage

plot_pmf(x, y, ..., col = "grey", add = FALSE)

Arguments

x

values

y

probability mass values y = f(x)

...

passed to plot() and rect()

col

Fill color of bars.

add

Add bars to existing plot.

Plots the probability values as a barplot.

Value

No return value, this function generates a plot in the current graphics device.

Examples

x <- seq(0, 5)
y <- dpois(x, lambda = 2)
plot_pmf(x, y)

[Package psborrow2 version 0.0.3.4 Index]