Re: [R] non-zero sequence of numbers

From: Brahm, David <David.Brahm_at_geodecapital.com>
Date: Wed 12 Oct 2005 - 07:25:52 EST


Jason Horn <jason@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.)


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Oct 12 07:30:58 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:41:28 EST