Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.A41.4.58.0408051407090.67154@homer07.u.washington.edu>
Date: 2004-08-05T21:08:20Z
From: Thomas Lumley
Subject: or of a logical vector
In-Reply-To: <3A822319EB35174CA3714066D590DCD504AF81A7@usrymx25.merck.com>

On Thu, 5 Aug 2004, Liaw, Andy wrote:

> Is there anything wrong with sum(v) > 0?
>

any(v) has the advantage of having the same NA handling as Ben's function,
so that any(v) is TRUE if there is at least one TRUE and any number of NAs
and is NA if there are NAs and no TRUEs.

	-thomas