[Analogue-commits] r380 - in pkg: R inst tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 8 07:21:32 CEST 2013


Author: gsimpson
Date: 2013-10-08 07:21:32 +0200 (Tue, 08 Oct 2013)
New Revision: 380

Modified:
   pkg/R/print.performance.R
   pkg/inst/ChangeLog
   pkg/tests/Examples/analogue-Ex.Rout.save
Log:
zap small values in printed output in vector case; update the example reference material

Modified: pkg/R/print.performance.R
===================================================================
--- pkg/R/print.performance.R	2013-10-07 22:58:47 UTC (rev 379)
+++ pkg/R/print.performance.R	2013-10-08 05:21:32 UTC (rev 380)
@@ -4,10 +4,11 @@
     if(inherits(x, "data.frame")) {
         print.data.frame(x, digits = digits, ...)
     } else {
+        x <- zapsmall(x, digits = digits)
         perf.names <- names(x)
         attributes(x) <- NULL
         names(x) <- perf.names
-        print.default(x, digits = digits, ...) # x was round(x, 4)
+        print.default(x, digits = digits, ...)
     }
     invisible(x)
 }

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2013-10-07 22:58:47 UTC (rev 379)
+++ pkg/inst/ChangeLog	2013-10-08 05:21:32 UTC (rev 380)
@@ -16,6 +16,10 @@
 	* Vignette: Updated some details regarding C versions of
 	dissimilarity coefs.
 
+	* performance: a tweak to the print method to zap values that
+	are effectively 0. Only affects vectors of performance statistics
+	not data frames of stats.
+
 Version 0.11-5
 
 	* newDistance: (yet another) new distance() replacement to
@@ -197,8 +201,8 @@
 
 	* Tests: code in wa() generates slightly different results
 	under R 3.0.0 (to be). Differences are in the 8th or 9th
-	decimal place so irrelevant, but I was the reference output
-	for the examples was checking to that level of precision.
+	decimal place so irrelevant, but I was using the reference
+	output for the examples was checking to that level of precision.
 	For tests only, the Example in ?wa uses options(digits = 5).
 
 Version 0.10-0

Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save	2013-10-07 22:58:47 UTC (rev 379)
+++ pkg/tests/Examples/analogue-Ex.Rout.save	2013-10-08 05:21:32 UTC (rev 380)
@@ -1,5 +1,5 @@
 
-R version 3.0.2 Patched (2013-10-07 r64035) -- "Frisbee Sailing"
+R version 3.0.2 Patched (2013-09-26 r64005) -- "Frisbee Sailing"
 Copyright (C) 2013 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
@@ -1208,7 +1208,7 @@
 > ## performance statistics
 > performance(ik.boot)
    RMSEP       R2 Avg.Bias Max.Bias 
-  2.3846   0.8948  -0.1778  -3.2058 
+   2.385    0.895   -0.178   -3.206 
 > 
 > 
 > 
@@ -4473,8 +4473,8 @@
 > 
 > ## the model performance statistics
 > performance(mod)
-      RMSE         R2   Avg.Bias   Max.Bias 
- 2.019e+00  9.173e-01  2.228e-14 -3.815e+00 
+    RMSE       R2 Avg.Bias Max.Bias 
+   2.019    0.917    0.000   -3.815 
 > 
 > 
 > 
@@ -5775,7 +5775,7 @@
 > ## extract the model performance stats
 > performance(v12.pred)
    RMSEP       R2 Avg.Bias Max.Bias 
-  2.3617   0.8989  -0.1483  -3.2158 
+   2.362    0.899   -0.148   -3.216 
 > 
 > 
 > 
@@ -7726,7 +7726,7 @@
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  18.977 0.45 19.605 0.001 0.002 
+Time elapsed:  22.917 0.33 23.65 0 0.004 
 > grDevices::dev.off()
 null device 
           1 



More information about the Analogue-commits mailing list