
Hi, I am fairly new to R, and am stuck. 

I want to write an R function with argument n that returns a vector of length n with n simulated observations from the double exponential distribution with density: ??g(y) = 1/2e^-y

?

For the double exponential, I want to generate y~Exp(1) and then take ?y with probability 0.5

?

Does anyone know how I can do this in R?

Thanks!

Fran

	[[alternative HTML version deleted]]

