[Rd] abline and its documentation
François Pinard
pinard at iro.umontreal.ca
Thu May 4 00:04:36 CEST 2006
Hi, people. The documentation of abline says:
Usage:
abline(a, b, untf = FALSE, ...)
abline(h=, untf = FALSE, ...)
abline(v=, untf = FALSE, ...)
abline(coef=, untf = FALSE, ...)
abline(reg=, untf = FALSE, ...)
so suggesting that h= and v= usages are exclusive. There are examples
in the mailing list archives of using both at the same time, and I find
convenient, for example, doing:
abline(h=0, v=0, ...)
for bolding the position of the origin or the axes through the origin.
By doing so, we are using undocumented capabilities of abline and
consequently, writing bugged R code. It does not matter so much
interactively, but scripts may be more sensitive.
Would it be acceptable to amend abline documentation, so to commit the
capability of abline to do both h= and v= at once? Or even combined
with intercept and slope? (abline is able to do all three at once
already!) Then, R users and code could more safely rely on this.
Just a suggestion, and not a big matter, of course! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
More information about the R-devel
mailing list