On Tue, 15 Jun 2004 18:17:36 -0400, [EMAIL PROTECTED] wrote:

>hello, everybody,
>
>I met a problem that I want to generate a random uniform number by using 
>function with c interface. 
>
>What I found is only "unif_rand()", but its range is [0,1]. How can I create a 
>uniform random variable by using a function with c interface.
>
>Who can tell me what function it is and how to use?

It's not clear to me what you are asking for.  Do you want it to be
uniform on the range (A,B)?  Use A + (B-A)*unif_rand() or runif(A,B).
These are documented in the Writing R Extensions manual, along with a
large collection of other distributions (and instructions on how to
initialize them).

Duncan Murdoch

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to