[R] Code density functions

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jul 7 07:51:35 CEST 2004


F Z wrote:
> Dear Andy
> 
> Thanks for your reply.  I don't seem to find the file that you 
> suggested. I tried:
> 
>> file.show('C:/Program Files/R/rw1091/src/nmath/dnorm.c.')

You have installed a binary distribution.
You need to get the source tarball (directly accessible via the main 
CRAN page) that includes the file.

Uwe Ligges



> NULL
> Warning message:
> file.show(): file C:/Program Files/R/rw1091/src/nmath/dnorm.c. does not 
> exist
> 
> 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.
>>
>> Andy
>>
>> > 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.
>> ------------------------------------------------------------------------------ 
>>
> 
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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




More information about the R-help mailing list