[Analogue-commits] r157 - in pkg: . R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 18 20:04:17 CET 2010
Author: gsimpson
Date: 2010-01-18 20:04:17 +0100 (Mon, 18 Jan 2010)
New Revision: 157
Modified:
pkg/DESCRIPTION
pkg/R/fixUpTol.R
pkg/R/wa.formula.R
pkg/inst/ChangeLog
Log:
fix passing tolerance-related arguments from formula to default method in wa and correct a bug in argument matching within fixUpTol
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2010-01-16 16:53:24 UTC (rev 156)
+++ pkg/DESCRIPTION 2010-01-18 19:04:17 UTC (rev 157)
@@ -1,7 +1,7 @@
Package: analogue
Type: Package
Title: Analogue and weighted averaging methods for palaeoecology
-Version: 0.6-22
+Version: 0.6-23
Date: $Date$
Depends: R (>= 2.5.0), stats, graphics, vegan, lattice, MASS
Author: Gavin L. Simpson, Jari Oksanen
Modified: pkg/R/fixUpTol.R
===================================================================
--- pkg/R/fixUpTol.R 2010-01-16 16:53:24 UTC (rev 156)
+++ pkg/R/fixUpTol.R 2010-01-18 19:04:17 UTC (rev 157)
@@ -1,7 +1,7 @@
## fix-up tolerances for use in TF computations
fixUpTol <- function(tol, na.tol, small.tol, min.tol, f, env) {
## first missing tolerances
- if(any(NA.TOL <- is.na(tol))) {
+ if(any(NA.TOL <- is.na(tol) | is.infinite(tol))) {
tol[NA.TOL] <-
switch(na.tol,
min = min(tol, na.rm = TRUE),
@@ -10,7 +10,6 @@
}
## second, replace tol < min.tol
if(!is.null(min.tol) && any(MIN.TOL <- tol < min.tol)) {
- small.tol <- match.arg(small.tol)
## min.tol must be in or on extremesof range(env)
if(min.tol < min(env) || min.tol > max(env))
stop("'min.tol' must be >= min(env) and <= max(env)")
Modified: pkg/R/wa.formula.R
===================================================================
--- pkg/R/wa.formula.R 2010-01-16 16:53:24 UTC (rev 156)
+++ pkg/R/wa.formula.R 2010-01-18 19:04:17 UTC (rev 157)
@@ -28,7 +28,9 @@
mt <- attr(mf, "terms")
y <- model.response(mf, "numeric")
x <- model.matrix(mt, mf)
- res <- wa.default(x, y, deshrink = deshrink, tol.dw = tol.dw, ...)
+ res <- wa.default(x, y, deshrink = deshrink, tol.dw = tol.dw,
+ na.tol = na.tol, small.tol = small.tol,
+ min.tol = min.tol, f = f, ...)
res$na.action <- attr(mf, "na.action")
res$call <- .call
if(model) {
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2010-01-16 16:53:24 UTC (rev 156)
+++ pkg/inst/ChangeLog 2010-01-18 19:04:17 UTC (rev 157)
@@ -1,5 +1,19 @@
analogue Change Log
+Version 0.6-23
+
+ * tran: 'rootroot' transformation was same as 'cuberoot' from
+ vhanges made in r140. Now fixed.
+
+ * wa: 'formula' method was not passing tolerance-related arguments
+ to default method. As such, the newer code to handle small
+ tolerance values was not being invoked when using the formula
+ interface to wa().
+
+ Code was also tidied a bit.
+
+ * fixUpTol: was inappropriately matching one of it's arguments.
+
Version 0.6-22
* tran.formula: bug in my implementation of the standard
More information about the Analogue-commits
mailing list