11,12c11,15
< 	temp <- as.vector(coef(a))
< 	if(length(temp) == 1) {
---
>         tempa <- as.character(terms(a))
>         coefa <- coef(a)
>         if (length(coefa) > 2)
>             warning("The abline function is meant to only plot the regression line for simple linear regression")
> 	if (length(grep("-[[:blank:]]?1", tempa))) {
14c17
< 	    b <- temp
---
> 	    b <- ifelse(length(grep("offset", tempa)), 1, coefa[1])
16,17c19,22
< 	    a <- temp[1]
< 	    b <- temp[2]
---
>             a <- coefa[1]
>             if (length(grep("offset", tempa))) b <- 1
>             else if (length(coefa) >= 2) b <- coefa[2]
>                  else b <- 0
