Skip to content

non-zero sequence of numbers

1 message · Brahm, David

#
Jason Horn <jason at 109valentine.com> wrote:
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)