[R] function lm, get back the coefficient
b.rowlingson at lancaster.ac.uk
Tue Jul 26 17:43:03 CEST 2011
On Tue, Jul 26, 2011 at 4:21 PM, ascoquel <ascoquel at yahoo.fr> wrote:
> I've done a linear fit on my data and I would like to get back the a (time)
> coefficient ...
>  "result"
> But I would like just the value 0.02530191 ... I tried result$time but it
> doesn't work ...
It is 'just the value'. It happens to be in a named vector with a
length of 1. You can do anything to it that you want to do with any
other number. Try result * 2, or sqrt(result).
If it really annoys you, try names(result)=NULL to get rid of the name.
More information about the R-help