Use a panel function; order the contained functions in the order you'd like parts added; make use of ...
to avoid having to know / manage all parameters to the panel function
bwplot(coef ~ habitat, data = res, panel=function(...) {
panel.abline(h=0, col="green")
panel.bwplot(...)
})
The notion of a panel function makes more sense when there are several panels, e.g.,
res = data.frame(coef=rnorm(99) + (-1):1, habitat=sample(letters[1:3], 99, TRUE),
grp=c("W", "X", "Y"))
bwplot(coef ~ habitat | grp, data = res, panel=function(x, y, ...) {
## green line at panel-median y value
panel.abline(h=median(y), col="green")
panel.bwplot(x, y, ...)
})