Skip to content
Prev 18112 / 398502 Next

check without loop

On Wed, Mar 20, 2002 at 11:40:58AM -0500, jimi adams wrote:
...
if( !(80 %in% arclist)) {...}

Getting a bit trickier, if you need to know which element it is, 
check out "which()".  e.g.  if you would only proceed if 79 was 
one of the first 20 elements

if(any(which(arclist == 79) <=20)) {...}

Cheers

Jason
Message-ID: <20020321064032.A29703@camille.indigoindustrial.co.nz>
In-Reply-To: <00eb01c1d02e$03e07800$768f1941@columbus.rr.com>; from imij@columbus.rr.com on Wed, Mar 20, 2002 at 11:40:58AM -0500