Skip to content

power.t.test needs to check delta==NULL before abs(delta) (PR#3139)

4 messages · A.J. Rossini, Brian Ripley

#
Something like the following should be done for power.t.test to make
sure that it doesn't try to evaluate abs(NULL), which results in an
error.

--- rossini.power.t.test.R      2003-05-30 07:24:49.000000000 -0700
+++ rossini.power.t.test.R.~1~  2003-05-30 08:47:09.000000000 -0700
@@ -10,7 +10,7 @@
   alternative <- match.arg(alternative)
   tsample <- switch(type, one.sample = 1, two.sample = 2, paired = 1)
   tside <- switch(alternative, one.sided = 1, two.sided = 2)
-  if (tside == 2 && !is.null(delta))
+  if (tside == 2)
     delta <- abs(delta)
   p.body <- quote({
     nu <- (n - 1) * tsample


--please do not edit the information below--

Version:
 platform = powerpc-unknown-linux-gnu
 arch = powerpc
 os = linux-gnu
 system = powerpc, linux-gnu
 status = Patched
 major = 1
 minor = 7.0
 year = 2003
 month = 05
 day = 25
 language = R

Search Path:
 .GlobalEnv, package:methods, package:ctest, package:mva, package:modreg, package:nls, package:ts, Autoloads, package:base
#
It's the same as PR#2993, fixed yesterday in R-patched & R-devel
On Fri, 30 May 2003 rossini@blindglobe.net wrote:

            
That's a backwards patch, I presume, or you revert the fix.

  
    
#
Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
I don't have a record of that bug report being sent to r-devel mailing
list.  Is there a way to recieve bug reports other than firing up a
browser? 

best,
-tony
#
On Fri, 30 May 2003, A.J. Rossini wrote:

            
Peter automatically sends a weekly list to R-devel.  They should all be
copied to R-devel, but some do fail to get through.