[rkward-cvs] SF.net SVN: rkward:[4109] trunk/rkward/rkward/plugins/plots
sjar at users.sourceforge.net
sjar at users.sourceforge.net
Mon Dec 12 21:57:18 UTC 2011
Revision: 4109
http://rkward.svn.sourceforge.net/rkward/?rev=4109&view=rev
Author: sjar
Date: 2011-12-12 21:57:18 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
* trim for arithmetic mean in boxplot added
+ GUI wise ugly and wrong, needs fix (but how? options do not allow further options)
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-12 20:47:37 UTC (rev 4108)
+++ trunk/rkward/rkward/plugins/plots/box_plot.js 2011-12-12 21:57:18 UTC (rev 4109)
@@ -56,7 +56,7 @@
}
echo ('try (boxplot (data_list' + boxwex + positions + ', notch = ' + getValue ("notch") + ', outline = ' + getValue("outline") + ', horizontal = ' + getValue("orientation") + getValue ("plotoptions.code.printout") + ')) #actual boxplot function\n');
if (mean == "TRUE") {
- var mean_fun = "mean"; // arithmetic mean
+ var mean_fun = "mean" + ", trim=" + getValue("trim"); // arithmetic 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');
mean_fun = "geo_mean";
Modified: trunk/rkward/rkward/plugins/plots/box_plot.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.rkh 2011-12-12 20:47:37 UTC (rev 4108)
+++ trunk/rkward/rkward/plugins/plots/box_plot.rkh 2011-12-12 21:57:18 UTC (rev 4109)
@@ -22,6 +22,7 @@
<setting id="notch">Whether to draw notches</setting>
<setting id="outline">Whether to draw outliers (if any). Outliers are draw as dots, if this option is checked.</setting>
<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="sd">Whether to draw a mark indicating the standard deviation.</setting>
@@ -35,6 +36,7 @@
<ul>
<li><link href="rkward://component/barplot"/></li>
<li><link href="rkward://rhelp/boxplot"/></li>
+ <li><link href="rkward://rhelp/mean"/></li>
</ul>
</related>
</document>
Modified: trunk/rkward/rkward/plugins/plots/box_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.xml 2011-12-12 20:47:37 UTC (rev 4108)
+++ trunk/rkward/rkward/plugins/plots/box_plot.xml 2011-12-12 21:57:18 UTC (rev 4109)
@@ -23,6 +23,7 @@
<connect client="names_exp.visible" governor="rexp_names"/>
<connect client="type_of_mean.enabled" governor="mean.state"/>
+ <connect client="trim.enabled" governor="mean.state"/>
<connect client="pch_mean.enabled" governor="mean.state"/>
<connect client="pch_sd_high.enabled" governor="sd.state"/>
<connect client="pch_sd_low.enabled" governor="sd.state"/>
@@ -77,8 +78,11 @@
</column>
<column>
<frame label="Mean">
+ <row>
<checkbox id="mean" checked="false" value="TRUE" label="show mean" />
<spinbox type="integer" id="pch_mean" label="mean symbol" initial="15"/>
+ <spinbox id="trim" label="Trim of arithmetic mean" type="real" min="0" max="0.5" initial="0.0" />
+ </row>
<radio id="type_of_mean" label="Type of mean" >
<option value="arithmetic_mean" label="Arithmetic mean" checked="true" />
<option value="geometric_mean" label="Geometric mean" />
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