Kyeongmi Cheon
2008-Mar-30 04:09 UTC
[Rd] norm_rand() in R-extension vs rnorm in R ---which is better?
I need to generate good quality of random numbers from univariate normal distribution for further transformation. I tried rnorm in R but it was not good sometimes. Someone said C++ standard library or Fortran's built-in functions for that are good. I found that there is double norm_rand() in R-extension. Does this function, norm_rand() use the same algorithm as rnorm in R or something similar in C/C++? Or does anyone know which one between norm_rand() in R-extension and rnorm in R is better? If anyone could help, I would appreciate it. Kyeongmi University of Memphis
Daniel Nordlund
2008-Mar-30 06:48 UTC
[Rd] norm_rand() in R-extension vs rnorm in R ---which is better?
> -----Original Message----- > From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf > Of Kyeongmi Cheon > Sent: Saturday, March 29, 2008 9:09 PM > To: r-devel at r-project.org > Subject: [Rd] norm_rand() in R-extension vs rnorm in R ---which is better? > > I need to generate good quality of random numbers from univariate > normal distribution for further transformation. I tried rnorm in R but > it was not good sometimes. Someone said C++ standard library or > Fortran's built-in functions for that are good. I found that there is > double norm_rand() in R-extension. Does this function, norm_rand() > use the same algorithm as rnorm in R or something similar in C/C++? Or > does anyone know which one between norm_rand() in R-extension and > rnorm in R is better? If anyone could help, I would appreciate it. > Kyeongmi >What do you mean when you write that rnorm "was not good sometimes"? Can you provide an example which demonstrates that rnorm performs poorly? Enquiring minds would like to know. Dan Daniel Nordlund Bothell, WA USA
Reasonably Related Threads
- help with segmentation fault
- object size of a matrix and a list
- Is there any way to find out how a certain functions are implemented in R?
- system.time gives error when "=" is used for assignment (R-2.6.0)
- R-extension in unix system -- help to locate header files