[Rd] Random number generation

From: subramanian R <supersubu123_at_gmail.com>
Date: Tue, 05 Aug 2008 18:17:30 +0530

Hi All,

           I have a few queries regarding Random Number generation in R.
           according to the help(Random.User) i defined my own functions for
user_unif_rand and user_norm_rand (uniform and normal distribution)

           But what i figured out was even when i call rexp,rpois,rgeom and other distributions they were routed via user_unif_rand. 1. Does this mean that for all types of distribution it generates an Uniform distribution and transforms to the requested type?

Also surprisingly even rnorm which i hoped to route via user_norm_rand was calling user_unif_rand...

> rnorm(1)

inside user_unif_rand//printf and
inside user_unif_rand
[1] 0.5973648

Please help me out understanding this...

2. Our goal is to link with an vectorized Random number generator library for our multi-core architecture.

    So is it enough if we define user_unif_rand function alone and will it take care of all distributions?

Thanks in Anticipation,
R. Subramanian

        [[alternative HTML version deleted]]

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 05 Aug 2008 - 12:57:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Aug 2008 - 15:06:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive