ripley@stats.ox.ac.uk
2003-May-30 18:06 UTC
[Rd] power.t.test needs to check delta==NULL before abs(delta) (PR#3140)
It's the same as PR#2993, fixed yesterday in R-patched & R-devel On Fri, 30 May 2003 rossini@blindglobe.net wrote:> > 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.That's a backwards patch, I presume, or you revert the fix.> --- 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 > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595