A function to generate random numbers from the triangular distribution.

Description

Generates a random sample of size n from the desired triangular distribution with parameters, a and b.

Usage

1
rtriangular(n, a, b)

Arguments

n

a numeric value which denotes the sample size.

a

a numeric value for the first parameter.

b

a numeric value for the second parameter.

Details

b should be greater than a.

Value

Returns a vector of sample.

Author(s)

Ozlem Ilk

References

Ilk, O. (2011). R Yazilimina Giris [Introduction to R Language]. ODTU Yayincilik [METU Press].

Examples

1
rtriangular(5,1,5)