Learn R Programming

reproducer (version 0.5.3)

LaplaceDist: LaplaceDist

Description

Returns a sample of N observations from a Laplace distribution with specified mean and spread.

Usage

LaplaceDist(N, mean, spread, max = 0.5, min = -0.5)

Value

N values from a Laplace distribution

Arguments

N

is the required sample size

mean

is the required mean

spread

is the spread of the function

max

the upper limit of the distribution. Must be finite.

min

the lower limit of the distribution. Must be finite.

Author

Barbara Kitchenham and Lech Madeyski

Examples

Run this code
set.seed(123)
LaplaceDist(10, 0, 1)
#  [1] -0.55311564  0.85946218 -0.20094937  1.45258293  2.12808209 -2.39565480  0.05785263
#   [8]  1.53636446  0.10855453 -0.09076809

Run the code above in your browser using DataLab