s-news
[Top] [All Lists]

Re: tracking down warnings message

To: "Leeds, Mark" <mleeds@mlp.com>
Subject: Re: tracking down warnings message
From: Sundar Dorai-Raj <sundar.dorai-raj@PDF.COM>
Date: Wed, 28 Jul 2004 15:43:22 -0500
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <54668D97C0199943A454516A5FF6481E58A18A@EXCHUS001.AD.MLP.COM>
Organization: PDF Solutions, Inc.
References: <54668D97C0199943A454516A5FF6481E58A18A@EXCHUS001.AD.MLP.COM>
Reply-to: sundar.dorai-raj@PDF.COM
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)


Leeds, Mark wrote:

i have a pretty complex program that
calls a library that i built that has functions in it.
the program runs correctly but then
at the end of it, i get warnings.
the message is repeated
50 times and is
1: Condition has 2 elements : only the first used in : if ( smax < s)
smax <- s
2 ditto

`if' is not a vectorised function yet you supplied a vector to it. The warning implies `smax < s' is a vector of length 2. Perhaps you want something like

if(all(smax < s))

or

if(any(smax < s))

However if you are not expecting smax and/or s to have length greater than one, then you need to investigate how these objects are created.

--sundar



<Prev in Thread] Current Thread [Next in Thread>