powered by
This function computes the differences among values of a table, used in probability calculations.
.Deltas(P, first = 0)
A vector or matrix of differences.
A numeric vector or matrix representing probabilities.
The starting value for difference calculation.
P <- c(0.2, 0.3, 0.5) .Deltas(P)
Run the code above in your browser using DataLab