[R] Code density functions

F Z gerifalte28 at hotmail.com
Wed Jul 7 03:35:52 CEST 2004

Dear Andy

Thanks for your reply.  I don't seem to find the file that you suggested. I 

>file.show('C:/Program Files/R/rw1091/src/nmath/dnorm.c.')
Warning message:
file.show(): file C:/Program Files/R/rw1091/src/nmath/dnorm.c. does not 

Then I looked at the directory and tried a file with similar name:

>file.show('C:/Program Files/R/rw1091/src/include/Rmath.h')

But this file does not show the actual code used to calculate the densities, 
only the declarations of the procedures.

What am I doing wrong?

Thanks again!

Francisco Zagmutt :)

>From: "Liaw, Andy" <andy_liaw at merck.com>
>To: "'F Z'" <gerifalte28 at hotmail.com>,R-help at stat.math.ethz.ch
>Subject: RE: [R] Code density functions
>Date: Tue, 6 Jul 2004 18:35:24 -0400
>Dear <insert your name here>:
>You need to look at the C-level source codes, in R-1.9.1/src/nmath/d*.c.
> > From: F Z
> >
> > Hello
> >
> > I would like to see the algorithm that R uses to generate
> > density functions
> > for several distributions (i.e. Normal,Weibull, etc).  I tried:
> >
> > >dnorm
> > function (x, mean = 0, sd = 1, log = FALSE)
> > .Internal(dnorm(x, mean, sd, log))
> > <environment: namespace:stats>
> >
> > How can I see the code used for densities?
> >
> > Thanks!
>Notice:  This e-mail message, together with any attachments, contains 
>information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
>Jersey, USA 08889), and/or its affiliates (which may be known outside the 
>United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
>Banyu) that may be confidential, proprietary copyrighted and/or legally 
>privileged. It is intended solely for the use of the individual or entity 
>named on this message.  If you are not the intended recipient, and have 
>received this message in error, please notify us immediately by reply 
>e-mail and then delete it from your system.

More information about the R-help mailing list