[Analogue-commits] r399 - in pkg: . R inst man tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 31 06:27:27 CET 2013


Author: gsimpson
Date: 2013-12-31 06:27:26 +0100 (Tue, 31 Dec 2013)
New Revision: 399

Modified:
   pkg/DESCRIPTION
   pkg/R/plot3d.prcurve.R
   pkg/inst/ChangeLog
   pkg/man/plot3d.prcurve.Rd
   pkg/tests/Examples/analogue-Ex.Rout.save
Log:
Update plot3d.prcurve to use the data and ordination stored in the fitted prcurve object.

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2013-12-22 05:23:44 UTC (rev 398)
+++ pkg/DESCRIPTION	2013-12-31 05:27:26 UTC (rev 399)
@@ -1,7 +1,7 @@
 Package: analogue
 Type: Package
 Title: Analogue and weighted averaging methods for palaeoecology
-Version: 0.13-0
+Version: 0.13-1
 Date: $Date$
 Depends: R (>= 2.15.0), vegan (>= 1.17-12), lattice, rgl
 Imports: mgcv, MASS, stats, graphics, grid, brglm, princurve

Modified: pkg/R/plot3d.prcurve.R
===================================================================
--- pkg/R/plot3d.prcurve.R	2013-12-22 05:23:44 UTC (rev 398)
+++ pkg/R/plot3d.prcurve.R	2013-12-31 05:27:26 UTC (rev 399)
@@ -1,5 +1,4 @@
-`plot3d.prcurve` <- function(x, data, scale = FALSE,
-                             choices = 1:3, display = "sites",
+`plot3d.prcurve` <- function(x, choices = 1:3, display = "sites",
                              scaling = 0,
                              lcol = "darkorange", lwd = 2,
                              decorate = TRUE,
@@ -17,7 +16,8 @@
         }
     }
     ## do ordination
-    ord <- rda(data, scale = scale)
+    ## ord <- rda(x$data, scale = scale)
+    ord <- x$ordination ## this is now stored
     ## process labels
     if(missing(xlab) || is.null(xlab))
         xlab <- paste0("PC", choices[1])

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2013-12-22 05:23:44 UTC (rev 398)
+++ pkg/inst/ChangeLog	2013-12-31 05:27:26 UTC (rev 399)
@@ -1,5 +1,10 @@
 analogue Change Log
 
+Version 0.13-1 Opened 24 December 2013
+
+	* plot3d.prcuve: was not using the `data` & `ordination` objects
+	stored within the fitted `prcurve` object.
+
 Version 0.13-0 Development branch opened 16 December 2013
 
 	* predict.pcr: internal function was calling `fitPCR()` via

Modified: pkg/man/plot3d.prcurve.Rd
===================================================================
--- pkg/man/plot3d.prcurve.Rd	2013-12-22 05:23:44 UTC (rev 398)
+++ pkg/man/plot3d.prcurve.Rd	2013-12-31 05:27:26 UTC (rev 399)
@@ -8,10 +8,9 @@
   using the \pkg{rgl} package and functions from \pkg{vegan}.
 }
 \usage{
-\method{plot3d}{prcurve}(x, data, scale = FALSE, choices = 1:3,
-       display = "sites", scaling = 0, lcol = "darkorange", lwd = 2,
-       decorate = TRUE, xlab = NULL, ylab = NULL, zlab = NULL,
-       main = NULL, ...)
+\method{plot3d}{prcurve}(x, choices = 1:3, display = "sites", scaling = 0,
+       lcol = "darkorange", lwd = 2, decorate = TRUE, xlab = NULL,
+       ylab = NULL, zlab = NULL, main = NULL, ...)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
@@ -19,13 +18,6 @@
     an object of class \code{"prcurve"} resulting from a call to
     \code{\link{prcurve}}.
   }
-  \item{data}{
-    the data used to fit the principal curve.
-  }
-  \item{scale}{
-    logical; should the variables in \code{data} be scaled to zero mean
-    and unit variance?
-  }
   \item{choices}{
     numeric vector of length 3; the ordination axes to plot.
   }
@@ -89,7 +81,7 @@
                    vary = FALSE, penalty = 1.4)
 
 ## 3D plot of data with curve superimposed
-plot3d(aber.pc, abernethy2)
+plot3d(aber.pc)
 
 }
 % Add one or more standard keywords, see file 'KEYWORDS' in the

Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save	2013-12-22 05:23:44 UTC (rev 398)
+++ pkg/tests/Examples/analogue-Ex.Rout.save	2013-12-31 05:27:26 UTC (rev 399)
@@ -26,7 +26,7 @@
 Loading required package: lattice
 This is vegan 2.0-10
 Loading required package: rgl
-This is analogue 0.13-0
+This is analogue 0.13-1
 > 
 > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
 > cleanEx()
@@ -5388,7 +5388,7 @@
 
 > 
 > ## 3D plot of data with curve superimposed
-> plot3d(aber.pc, abernethy2)
+> plot3d(aber.pc)
 > 
 > 
 > 
@@ -7791,7 +7791,7 @@
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  21.822 0.288 23.53 0.002 0.002 
+Time elapsed:  22.251 0.337 24.003 0.001 0.002 
 > grDevices::dev.off()
 null device 
           1 



More information about the Analogue-commits mailing list