Deal list> I want to generate a random number in an interval using exponential low > I know how to make that simply using uniform low > x1 <- runif(1, 5.0, 7.5) > this will generate a number between 5 et 7.5 but with uniform low. > Could you help pease.? > Regards > > -- > PhD candidate in Computer Science > Address > 3 avenue lamine, cité ezzahra, Sousse 4000 > Tunisia > tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) > fax: +216 71 391 166 >[[alternative HTML version deleted]]
R. Michael Weylandt <michael.weylandt@gmail.com>
2011-Dec-13 12:12 UTC
[R] generate a number using exponential low
It's not entirely clear to me what you mean by an "exponential low" but the lmomco package provides r,d,p,q-functions for both the shifted and truncated exponential distributions. Perhaps that's what you're after? If there's another distribution you have in mind, I'd check the CRAN distributions task view - it's quite comprehensive. Michael On Dec 13, 2011, at 3:05 AM, Adel ESSAFI <adelessafi at gmail.com> wrote:> Deal list > >> I want to generate a random number in an interval using exponential low >> I know how to make that simply using uniform low >> x1 <- runif(1, 5.0, 7.5) >> this will generate a number between 5 et 7.5 but with uniform low. >> Could you help pease.? >> Regards >> >> -- >> PhD candidate in Computer Science >> Address >> 3 avenue lamine, cit? ezzahra, Sousse 4000 >> Tunisia >> tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) >> fax: +216 71 391 166 >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.