Skip to contents

Calculate the triangular density function value.

Usage

dtri(x, min = 0, max = 1, mode = 0.5)

Arguments

x

numeric. A vector of values.

min

numeric. The support minimum.

max

numeric. The support maximum.

mode

numeric. The mode (argmax) of the density function.

Value

A vector of the same length as x.

Examples

if (FALSE) {
x <- c(0.2, 0.5, -2, 1.5, NA)
dtri(x, min = 0, max = 1, mode = 0.5)
}