[rkward-cvs] SF.net SVN: rkward:[4120] trunk/rkward/rkward/plugins/plots

sjar at users.sourceforge.net sjar at users.sourceforge.net
Tue Dec 13 22:55:07 UTC 2011


Revision: 4120
          http://rkward.svn.sourceforge.net/rkward/?rev=4120&view=rev
Author:   sjar
Date:     2011-12-13 22:55:06 +0000 (Tue, 13 Dec 2011)
Log Message:
-----------
* fix bug & name

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

Modified: trunk/rkward/rkward/plugins/plots/box_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.js	2011-12-13 21:53:53 UTC (rev 4119)
+++ trunk/rkward/rkward/plugins/plots/box_plot.js	2011-12-13 22:55:06 UTC (rev 4120)
@@ -58,13 +58,13 @@
 	if (do_mean) {
 		var mean_fun = "mean";
 		if (getValue ("type_of_mean") =="geometric_mean") {
-			echo('	geo_mean <- function (x) {prod(na.omit(x))^1/length(na.omit(x))}	#Calculate geometric mean\n');
+			echo('	geo_mean <- function (x) {prod(na.omit(x))^(1/length(na.omit(x)))}	#Calculate geometric mean\n');
 			mean_fun = "geo_mean";
 		} else if (getValue ("type_of_mean") =="harmonic_mean") {
 			echo('	har_mean <- function (x) {(1 / mean(1 / na.omit(x)))}	#Calculate harmonic mean\n');
 			mean_fun = "har_mean";
-		} else if (getValue ("type_of_mean") =="interquantile_mean") {
-			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 interquantile mean\n');
+		} else if (getValue ("type_of_mean") =="interquartile_mean") {
+		  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");

Modified: trunk/rkward/rkward/plugins/plots/box_plot.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.rkh	2011-12-13 21:53:53 UTC (rev 4119)
+++ trunk/rkward/rkward/plugins/plots/box_plot.rkh	2011-12-13 22:55:06 UTC (rev 4120)
@@ -24,7 +24,7 @@
 		<setting id="mean">Whether to draw a mark indicating the mean.</setting>
 		<setting id="trim">Trim applies only to the arithmetic mean. By default trim is set to zero. It defines the fraction of observations to be trimmed from each end of a variable before the arithmetic mean is computed.</setting>
 		<setting id="pch_mean">If the mean is to be indicated: Symbol to use as mark.</setting>
-		<setting id="type_of_mean">Use this option to select a specific type of mean. The arithmetic mean is the default. Others include the geometric mean, the harmonic mean and interquantile mean.</setting>
+		<setting id="type_of_mean">Use this option to select a specific type of mean. The arithmetic mean is the default. Others include the geometric mean, the harmonic mean and interquartile mean (IQM).</setting>
 		<setting id="sd">Whether to draw a mark indicating the standard deviation.</setting>
 		<setting id="pch_sd_high">If the standard deviation is to be indicated: Symbol to use as mark for the upper sd.</setting>
 		<setting id="pch_sd_low">If the standard deviation is to be indicated: Symbol to use as mark for the lower sd.</setting>

Modified: trunk/rkward/rkward/plugins/plots/box_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.xml	2011-12-13 21:53:53 UTC (rev 4119)
+++ trunk/rkward/rkward/plugins/plots/box_plot.xml	2011-12-13 22:55:06 UTC (rev 4120)
@@ -82,7 +82,7 @@
 								<option value="arithmetic_mean" label="Arithmetic mean" checked="true" />
 								<option value="geometric_mean" label="Geometric mean" />
 								<option value="harmonic_mean" label="Harmonic mean" />
-								<option value="interquantile_mean" label="Interquantile mean" />
+								<option value="interquartile_mean" label="Interquartile mean (IQM)" />
 							</radio>
 							<spinbox id="trim" label="Trim of arithmetic mean" type="real" min="0" max="0.5" initial="0.0" />
 						</row>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list