[Rd] abline for intercept-only simple lm models (with and without offset)

2006-12-09 Thread Tobias Verbeke
The abline function can be used to draw the regression line when one passes the lm object as an argument. However, if it's an intercept-only model, it appears to use the intercept as the slope of the abline: mod <- lm(dist ~ 1, data = cars) plot(dist ~ speed, data = cars) abline(reg = mod) # noth

Re: [Rd] Floating point maths in R

2006-12-09 Thread Tom McCallum
Many thanks for pointing that out. Tom On Sat, 09 Dec 2006 13:48:06 -, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Tom McCallum wrote: >> Hi, >> >> I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the >> wrong way or if there is a more serious bug. I was having proble

Re: [Rd] Floating point maths in R

2006-12-09 Thread Duncan Murdoch
On 12/9/2006 8:29 AM, Tom McCallum wrote: > Hi, > > I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the > wrong way or if there is a more serious bug. I was having problems > getting some calculations to add up so I ran the following tests: You should read the FAQ item "Why

Re: [Rd] Floating point maths in R

2006-12-09 Thread Peter Dalgaard
Tom McCallum wrote: > Hi, > > I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the > wrong way or if there is a more serious bug. I was having problems > getting some calculations to add up so I ran the following tests: > > Please read FAQ 7.31 and the reference therein.

Re: [Rd] Pre-compilation and server-side parallel execution

2006-12-09 Thread Erik van Zijst
Simon Urbanek wrote: > > On Dec 8, 2006, at 9:51 AM, Erik van Zijst wrote: > >> 2. R's native C-api >> [http://cran.r-project.org/doc/manuals/R-exts.html#The-R-API] does not >> separate parsing from evaluation. N.B. above I mistakenly referred to chapter "The R API", but instead I was referrin

[Rd] Floating point maths in R

2006-12-09 Thread Tom McCallum
Hi, I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the wrong way or if there is a more serious bug. I was having problems getting some calculations to add up so I ran the following tests: > (2.34567 - 2.0) == 0.34567 <--- should be true [1] FALSE > (2.23-2.00) == 0