From p.dalgaard@biostat.ku.dk  Thu Aug 22 16:45:19 2002
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 22 Aug 2002 17:45:19 +0200
Subject: Symbolic differentiation ("D","deriv", etc.) (PR#1928)
In-Reply-To: <200208221245.OAA14923@pubhealth.ku.dk>
References: <200208221245.OAA14923@pubhealth.ku.dk>
Message-ID: <x2n0re3njk.fsf@biostat.ku.dk>

lylek@utk.edu writes:

> > 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)
> > - (15 * 1/p^2 + 11 * 1/(1 - p)^2)
> [1] -106.5212
> 
> R seems to be dropping the outer parentheses.

Yes. Duncan Murdoch has been working on that recently.  

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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)
Peter Dalgaard BSA