plotdiscdensity {recapr} | R Documentation |
Plotting the Density of a Vector of Discrete Values
Description
Plots the empirical density of a vector of discrete values, approximating the probability mass function (pmf). This can be considered a more appropriate alternative to plot(density(x))
in the case of a vector with a discrete (non-continuous) support, such as that calculated by an abundance estimator.
Usage
plotdiscdensity(x, xlab = "value", ylab = "density", ...)
Arguments
x |
The vector of values to plot |
xlab |
The X-axis label for plotting |
ylab |
The Y-axis label for plotting |
... |
Additional plotting arguments |
Author(s)
Matt Tyers
Examples
draws <- rChapman(length=100000, N=500, n1=100, n2=100)
plotdiscdensity(draws) #plots the density of a vector of discrete values
[Package recapr version 0.4.4 Index]