hadley/ggplot2 — comment on commit a958384341f7bffdb1e2817f9ea6f4b9f3057e88
File:  line 0
By kohske:

Or, `all.equal` for numeric take care the tolerance, so simply,

```R
zero_range <- function (x) {
if (length(x) == 1) return(TRUE)
rng <- diff(range(x))
isTRUE(all.equal(x[1], x[2], tolerance = XXX))
}
```