[Analogue-commits] r195 - in pkg: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 29 19:31:50 CEST 2010


Author: gsimpson
Date: 2010-09-29 19:31:50 +0200 (Wed, 29 Sep 2010)
New Revision: 195

Modified:
   pkg/R/residLen.R
   pkg/inst/ChangeLog
   pkg/man/residLen.Rd
Log:
fix joining in residLen - should have been a left join

Modified: pkg/R/residLen.R
===================================================================
--- pkg/R/residLen.R	2010-09-29 16:45:12 UTC (rev 194)
+++ pkg/R/residLen.R	2010-09-29 17:31:50 UTC (rev 195)
@@ -4,7 +4,7 @@
 `residLen` <- function(X, env, passive,
                        method = c("cca", "rda")) {
     ## merge X and passive
-    dat <- join(X, passive)
+    dat <- join(X, passive, type = "left") ## Think this should have type = "left" ?
     X <- dat[[1]]
     passive <- dat[[2]]
     ## check env is same length as nrow(X)

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2010-09-29 16:45:12 UTC (rev 194)
+++ pkg/inst/ChangeLog	2010-09-29 17:31:50 UTC (rev 195)
@@ -16,14 +16,18 @@
 	species in order to fit the principal curve. 'initCurve'
 	implements several methods for initialising the principal curve.
 
-	* tran: improvements to the underlying code.
-
 	* Stratiplot: if 'zones' are supplied, a legend on the right-hand
 	side of the diagram can be drawn by setting argument 'drawLegend'
 	to TRUE (the default). Currently, only simple blocks that
 	demarcate the zone boundaries are drawn and labelled using
 	argument 'zoneNames'.
 
+	* residLen: was not 'join'-ing the training set and passive data
+	correctly and would fail if species were found in one but not the
+	other data set.
+
+	* tran: improvements to the underlying code.
+
 Version 0.6-26
 
 	* abernethy: New data set containing the classic Abernethy Forest

Modified: pkg/man/residLen.Rd
===================================================================
--- pkg/man/residLen.Rd	2010-09-29 16:45:12 UTC (rev 194)
+++ pkg/man/residLen.Rd	2010-09-29 17:31:50 UTC (rev 195)
@@ -80,14 +80,15 @@
   of the underlying computations.
 }
 \examples{
-data(swapdiat, swappH, rlgh)
+## load the Imbrie and Kipp example data
+data(ImbrieKipp, SumSST, V12.122)
 
-## squared residual lengths for RLGH
-rlens <- residLen(swapdiat, swappH, rlgh)
+## squared residual lengths for Core V12.122
+rlens <- residLen(ImbrieKipp, SumSST, V12.122)
 rlens
 
 ## as before but using linear RDA
-residLen(swapdiat, swappH, rlgh, method = "rda")
+residLen(ImbrieKipp, SumSST, V12.122, method = "rda")
 }
 \keyword{methods}
 \keyword{multivariate}



More information about the Analogue-commits mailing list