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

rossini at blindglobe.net rossini at blindglobe.net
Fri May 30 18:50:10 MEST 2003


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



More information about the R-devel mailing list