Park, Kyong H Mr CIV USA AMC
2010-Jan-21 20:05 UTC
[R] Retrieving an evaluated gradient value (UNCLASSIFIED)
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]]
Henrique Dallazuanna
2010-Jan-21 20:13 UTC
[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
Seemingly Similar Threads
- A function for random test based on longest run (UNCLASSIFIED)
- Lme does not work without a random effect (UNCLASSIFIED)
- A function for random test based on longest run (UNCLASSI FIED)
- aggregate() function, strange behavior for augmented data
- Function to Define a Function