Re: [R] Obtain gradient at multiple values for exponential decay model

2018-04-06 Thread g l
> Sent: Friday, April 06, 2018 at 1:44 PM > From: "Jeff Newmiller" > > You did not try my suggestion. You tried David's, which has a leftover > mistake from your guesses about what the argument to coef should be. Yes, sorry for the mistake. coef(graphmodeld) (Intercept) graphdata[, 1] 4.

Re: [R] Obtain gradient at multiple values for exponential decay model

2018-04-06 Thread g l
> Sent: Friday, April 06, 2018 at 5:55 AM > From: "David Winsemius" > > > Not correct. You already have `predict`. It is capale of using the `newdata` > values to do interpolation with the values of the coefficients in the model. > See: > > ?predict > The ยง details did not mention interpola

Re: [R] Obtain gradient at multiple values for exponential decay model

2018-04-06 Thread g l
> Sent: Friday, April 06, 2018 at 4:53 AM > From: "Jeff Newmiller" > To: "g l" > coef( graphmodeld ) > coef(graphmodelp) Error: $ operator is invalid for atomic vectors A quick search engine query revealed primarily references to the dollar sign ($) opera

Re: [R] Obtain gradient at multiple values for exponetial decay model

2018-04-05 Thread g l
> Sent: Thursday, April 05, 2018 at 4:40 PM > From: "Jeff Newmiller" > > the coef function. > For the benefit of other novices, used the following command to read the documentation: ?coef Then tried and obtained: > cvalue100<-coef(graphmodelp~100) > cvalue100 NULL Then looked at the model

[R] Obtain gradient at multiple values for exponetial decay model

2018-04-05 Thread g l
Readers, Data set: t,c 0,100 40,78 80,59 120,38 160,25 200,21 240,16 280,12 320,10 360,9 400,7 graphdata<-read.csv('~/tmp/data.csv') graphmodeld<-lm(log(graphdata[,2])~graphdata[,1]) graphmodelp<-exp(predict(graphmodeld)) plot(graphdata[,2]~graphdata[,1]) lines(graphdata[,1],graphmodelp) Please