powered by
This function produces a simple plot of the probability mass function of a discrete variable
pmf(x, absolute = T, xlim = NULL, lwd = 1, col = "black", title = NULL, xlab = "x", bty = "l", cex.title = NULL, cex.axis = NULL)
the (discrete) variable of interest
logical. If TRUE (default) absolute frequencies are plotted, if FALSE relative frequencies
TRUE
FALSE
limits for the x axis
line width
color used for the vertical frequency bars
plot title
label for the x axis
box type (default is bty="l")
bty="l"
title font size
font size for the axes
Mirko Signorelli
pmf(cars$speed) pmf(cars$speed, absolute = FALSE) pmf(cars$speed, lwd = 2, col = 'blue')
Run the code above in your browser using DataLab