[R] Retrieving an evaluated gradient value (UNCLASSIFIED)

Park, Kyong H Mr CIV USA AMC kyong.ho.park at us.army.mil
Wed Jan 27 13:15:41 CET 2010


Classification:  UNCLASSIFIED 
Caveats: NONE

I really appreciate Mr. Dallazuanna's quick reply for my question. See below.

Kyong 

-----Original Message-----
From: Henrique Dallazuanna [mailto:wwwhsd at gmail.com] 
Sent: Thursday, January 21, 2010 3:13 PM
To: Park, Kyong H Mr CIV USA AMC
Cc: r-help at r-project.org
Subject: Re: [R] Retrieving an evaluated gradient value (UNCLASSIFIED)

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
Classification:  UNCLASSIFIED 
Caveats: NONE



More information about the R-help mailing list