[18835] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] Bug in plot.multicomp

daemon@ATHENA.MIT.EDU (Buttrey, Samuel)
Tue Aug 3 13:55:42 1999

Message-Id: <DB17FBA383E4D211A9AF00A0C99E0169CAD9C7@monterey.nps.navy.mil>
From: "Buttrey, Samuel" <sebuttre@monterey.nps.navy.mil>
To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Date: Tue, 3 Aug 1999 10:59:08 -0700 
Mime-Version: 1.0
Content-Type: text/plain


Hi. Here's an insignificant bug in plot.multicomp() I'd like to draw to
MathSoft's attention. This function plots up to 21 comparisons per page
(when plot=T). In the code, "ptot" is the number of comparisons. The code
sets the number of pages by
	npage <- floor(ptot/21) + 1
which is wrong when ptot is an exact multiple of 21. For example, when
you're comparing 7 treatments, there are 7-choose-2 = 21 comparisons. The
code thinks there are two pages and dies when it can't find anything to put
on page 2.

This is not a big deal. Somebody certainly knows a neater way around this,
but one way is
	npage <- ifelse (ptot %% 21 == 0, ptot/21, floor (ptot/21) + 1)

Have fun,
Sam Buttrey
buttrey@nps.navy.mil
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post