Learn R Programming

OOmisc (version 1.2)

rlaplace: A function to generate random numbers from the Laplace distribution.

Description

Generates a random sample of size n from the Laplace distribution with a desidered parameter, beta.

Usage

rlaplace(n, beta)

Arguments

n
a numeric value for sample size
beta
a numeric value for the parameter, beta

Value

Returns a numeric vector of the sample.

Details

beta should be positive.

References

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

Examples

Run this code
rlaplace(10,2)

Run the code above in your browser using DataLab