[R] non-zero sequence of numbers
Brahm, David
David.Brahm at geodecapital.com
Tue Oct 11 23:25:52 CEST 2005
Jason Horn <jason at 109valentine.com> wrote:
> Can anyone think of a way to create a pretty() sequence that excludes
> zero?
You could use except(pretty(x), 0), if you first defined the (quite
useful) set-operation function:
R> except <- function(a,b) unique(a[!match(a, b, 0)])
(Consider this a plug to add "except" to the "union", "intersect",
etc., family of set operations.)
-- David Brahm (brahm at alum.mit.edu)
More information about the R-help
mailing list