[Analogue-commits] r167 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 23 16:43:04 CEST 2010
Author: gsimpson
Date: 2010-04-23 16:43:04 +0200 (Fri, 23 Apr 2010)
New Revision: 167
Modified:
pkg/R/plot.wa.R
pkg/R/wa.R
Log:
changed definition of residuals in WA and change ordering of axes in plot.wa method to match
Modified: pkg/R/plot.wa.R
===================================================================
--- pkg/R/plot.wa.R 2010-04-23 14:40:30 UTC (rev 166)
+++ pkg/R/plot.wa.R 2010-04-23 14:43:04 UTC (rev 167)
@@ -37,18 +37,16 @@
}
if (show[1]) {
lims <- range(Est, Obs)
- ylabel <- "Fitted values"
- plot(Obs, Est, type = "n", asp = 1, xlim = lims,
- ylim = lims, ylab = ylabel, xlab = "Observed", ...)
+ plot(Est, Obs, type = "n", asp = 1, xlim = lims,
+ ylim = lims, xlab = "Fitted values", ylab = "Observed", ...)
abline(0, 1, col = "grey", ...)
- panel(Obs, Est, ...)
+ panel(Est, Obs, ...)
if (one.fig)
title(sub = sub.caption, ...)
mtext(caption[1], 3, 0.25)
}
if (show[2]) {
- ylabel <- "Residuals"
- plot(Obs, Resi, type = "n", ylab = ylabel,
+ plot(Obs, Resi, type = "n", ylab = "Residuals",
xlab = "Observed", ...)
abline(h = 0, col = "grey", ...)
abline(h = mean(Resi), col = "blue", lty = "dashed")
Modified: pkg/R/wa.R
===================================================================
--- pkg/R/wa.R 2010-04-23 14:40:30 UTC (rev 166)
+++ pkg/R/wa.R 2010-04-23 14:43:04 UTC (rev 167)
@@ -55,7 +55,7 @@
## species names need to be reapplied
names(wa.optima) <- colnames(x)
## residuals
- resi <- wa.env - env
+ resi <- env - wa.env
## RMSE of predicted/fitted values
rmse <- sqrt(mean(resi^2))
## r-squared
More information about the Analogue-commits
mailing list