R-alpha: R-0.12alpha: BUG in print.htest ()

Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at)
Mon, 28 Oct 1996 12:39:49 +0100


Date: Mon, 28 Oct 1996 12:39:49 +0100
Message-Id: <199610281139.MAA00824@aragorn.ci.tuwien.ac.at>
From: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: R-0.12alpha:  BUG in print.htest ()

There is a problem in print.htest which manifests itself when
`parameter' has more than one element ... The patch below fixes that
(and does a little cosmetics).

Thanks,
-k

*** R-0.12alpha/src/library/base/htest.orig	Mon Oct 28 11:46:43 1996
--- R-0.12alpha/src/library/base/htest	Mon Oct 28 11:48:00 1996
***************
*** 5,14 ****
          if(!is.null(x$statistic))
                  cat(names(x$statistic), " = ", format(round(x$statistic, 4)), 
                          ", ", sep = "")
! 	for(parval in x$parameter) 
  		cat(paste(names(x$parameter), " = ", format(round(x$parameter,
  			3)), ",", sep = ""))
!         cat("p-value =", format(round(x$p.value, 4)), "\n")
          if(!is.null(x$alternative)) {
                  if(!is.null(x$null.value)) {
                          if(length(x$null.value) == 1) {
--- 5,14 ----
          if(!is.null(x$statistic))
                  cat(names(x$statistic), " = ", format(round(x$statistic, 4)), 
                          ", ", sep = "")
! 	if(!is.null (x$parameter))	
  		cat(paste(names(x$parameter), " = ", format(round(x$parameter,
  			3)), ",", sep = ""))
!         cat(" p-value =", format(round(x$p.value, 4)), "\n")
          if(!is.null(x$alternative)) {
                  if(!is.null(x$null.value)) {
                          if(length(x$null.value) == 1) {
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-