[rkward-cvs] SF.net SVN: rkward-code:[4797] trunk/rkward/rkward/plugins/plots/box_plot. js

tfry at users.sf.net tfry at users.sf.net
Wed Aug 27 07:52:11 UTC 2014


Revision: 4797
          http://sourceforge.net/p/rkward/code/4797
Author:   tfry
Date:     2014-08-27 07:52:11 +0000 (Wed, 27 Aug 2014)
Log Message:
-----------
Fix error when trying to use custom names

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/plots/box_plot.js

Modified: trunk/rkward/rkward/plugins/plots/box_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.js	2014-08-13 15:01:58 UTC (rev 4796)
+++ trunk/rkward/rkward/plugins/plots/box_plot.js	2014-08-27 07:52:11 UTC (rev 4797)
@@ -70,8 +70,8 @@
 		  echo('	interq_mean <- function (x) {sum(quantile(x, probs=c(0.25), na.rm=TRUE), quantile(x, probs=c(0.75), na.rm=TRUE)) / 2}	#Calculate the interquartile mean\n');
 			mean_fun = "interq_mean";
 		} else {	// arithmetic mean
-			var trim = getValue("trim");
-			if (trim != 0) mean_fun += ", trim=" + trim;
+			var trimp = getValue("trim");	// NOTE: avoid name clash with utility function trim()!
+			if (trimp != 0) mean_fun += ", trim=" + trimp;
 		}
 
 		if (horizontal) {





More information about the rkward-tracker mailing list