[R] Retrieving an evaluated gradient value (UNCLASSIFIED)

Henrique Dallazuanna wwwhsd at gmail.com
Thu Jan 21 21:13:25 CET 2010


Try this:

attr(junk1(k=0,b0=-14.0236,b1=2.44031), 'gradient')

On Thu, Jan 21, 2010 at 6:05 PM, Park, Kyong H Mr CIV USA AMC
<kyong.ho.park at us.army.mil> wrote:
> Classification:  UNCLASSIFIED
> Caveats: NONE
>
> Dear R users,
>
> How can I retrieve an evaluated gradient value from "deriv" function
> provided below? I want to retrieve b0 value. Appreciate your help.
>
> Kyong
>
> junk1<-deriv(~(1/b1)*k-b0/b1,"b0",c("k","b0","b1"),formal=T)
>
> junk1(k=0,b0=-14.0236,b1=2.44031)
> [1] 5.746647
> attr(, "gradient"):
>            b0
> [1,] -0.409784
>
> Classification:  UNCLASSIFIED
> Caveats: NONE
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list