Skip to contents

This function computes the differences among values of a table, used in probability calculations.

Usage

.Deltas(P, first = 0)

Arguments

P

A numeric vector or matrix representing probabilities.

first

The starting value for difference calculation.

Value

A vector or matrix of differences.

Examples

P <- c(0.2, 0.3, 0.5)
.Deltas(P)
#> [1] 1