plotdiscdensity: Plotting the Density of a Vector of Discrete Values

Description Usage Arguments Author(s) Examples

View source: R/rdraws_rpvals.R

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

1
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

1
2
draws <- rChapman(length=100000, N=500, n1=100, n2=100)
plotdiscdensity(draws)  #plots the density of a vector of discrete values

recapr documentation built on Sept. 8, 2021, 5:07 p.m.