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]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to