From dmurdoch@pair.com  Tue Aug 27 13:20:55 2002
From: dmurdoch@pair.com (dmurdoch@pair.com)
Date: Tue, 27 Aug 2002 14:20:55 +0200 (MET DST)
Subject: Symbolic differentiation ("D","deriv", etc.) (PR#1928)
Message-ID: <200208271220.OAA15599@pubhealth.ku.dk>

On Thu, 22 Aug 2002 14:45:47 +0200 (MET DST), you wrote:

>I apparently found an error in how "deriv" puts a derivative to the screen
>(though the internal representation is correct).  Here's what I was doing for a
>class example:
>
>> lnlk<-expression(15*log(p)+11*log(1-p))
>> p<-15/26
>> D(D(lnlk,"p"),"p")
>-15 * (1/p^2) + 11 * (1/(1 - p)^2)

This is now fixed in r-devel (to become 1.6.0):

> D(D(lnlk,"p"),"p")
-(15 * (1/p^2) + 11 * (1/(1 - p)^2))

Duncan Murdoch

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Symbolic differentiation ("D","deriv", etc.) (PR#1928)
dmurdoch@pair.com