[Vegan-commits] r1019 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 21 19:24:41 CEST 2009
Author: jarioksa
Date: 2009-09-21 19:24:40 +0200 (Mon, 21 Sep 2009)
New Revision: 1019
Modified:
pkg/vegan/R/calibrate.ordisurf.R
Log:
calibrate.ordisurf always returns type = 'response'
Modified: pkg/vegan/R/calibrate.ordisurf.R
===================================================================
--- pkg/vegan/R/calibrate.ordisurf.R 2009-09-21 17:19:43 UTC (rev 1018)
+++ pkg/vegan/R/calibrate.ordisurf.R 2009-09-21 17:24:40 UTC (rev 1019)
@@ -2,7 +2,7 @@
function(object, newdata, ...)
{
if (missing(newdata))
- fit <- fitted(object)
+ fit <- predict(object, type = "response", ...)
else {
## Got only a vector of two coordinates
if (is.vector(newdata) && length(newdata) == 2)
@@ -13,7 +13,7 @@
stop("needs a matrix or a data frame with two columns")
newdata <- data.frame(x1 = newdata[,1], x2 = newdata[,2])
}
- fit <- predict(object, newdata = newdata, ...)
+ fit <- predict(object, newdata = newdata, type = "response", ...)
}
fit
}
More information about the Vegan-commits
mailing list