[rkward-cvs] SF.net SVN: rkward:[3677] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Jun 6 12:31:59 UTC 2011
Revision: 3677
http://rkward.svn.sourceforge.net/rkward/?rev=3677&view=rev
Author: tfry
Date: 2011-06-06 12:31:58 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
More fixes for pareto and tabulation plugins.
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh
trunk/rkward/rkward/plugins/data/one_var_tabulation.xml
trunk/rkward/rkward/plugins/plots/pareto.js
trunk/rkward/rkward/plugins/plots/pareto.xml
trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/ChangeLog 2011-06-06 12:31:58 UTC (rev 3677)
@@ -1,6 +1,6 @@
-- Pareto-plot plugin gains more tabulation options TODO: also use in piechart; Why doesn't the Y-label update properly, when enabling / disabling tabulation?
+- Pareto-plot plugin gains more tabulation options TODO: also use in piechart, barplot
- rk.results() now prints rownames, where appropriate TODO: test
-- "frame" elements in plugins can now be made checkable TODO: document; Implement correctly, i.e. with property!
+- "frame" elements in plugins can now be made checkable TODO: document
- Disabling or hiding a plugin component makes it non-required, implicitly TODO: remove explicit connections to component.required in the plugins. Document
- Boxplot gains option to dogde grouped boxes TODO: add test; add colors?
- Simplify internal handling of system() and system2() output TODO: test on Windows!
Modified: trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh
===================================================================
--- trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh 2011-06-06 12:31:58 UTC (rev 3677)
@@ -29,6 +29,7 @@
The following external tags are provided for use in the embedding plugin.
<ul>
+ <li><i>varsource</i>: The tabulation plugin does not show its own varselector by default. Connect your own to this one (client="embedded_id.varsource.selected", governor="myvarselector_id.selected").</li>
<li><i>outvar</i>: By default, the plugin produces a table in a variable called "x". You can set it to use a different name, here.</li>
<li><i>titlevar</i>: If you want the plugin to save a description of the grouping variables in an R variable, set this to an object name to use. Defaults to "", i.e. disabled.</li>
<li><i>fun_label</i>: This property will be set to a description of the statistic.</li>
Modified: trunk/rkward/rkward/plugins/data/one_var_tabulation.xml
===================================================================
--- trunk/rkward/rkward/plugins/data/one_var_tabulation.xml 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/rkward/plugins/data/one_var_tabulation.xml 2011-06-06 12:31:58 UTC (rev 3677)
@@ -5,7 +5,7 @@
<logic>
<external id="outvar" default="x"/>
<external id="titlevar" default=""/>
- <external id="fun_label" default=""/>
+ <external id="fun_label" default=""Frequency""/>
<set id="varsource.visible" to="false"/>
@@ -33,7 +33,6 @@
}
gui.setValue ("fun_label", quote (label));
}
- updateFunLabel ();
]]></script>
</logic>
<dialog label="Tabulate" >
Modified: trunk/rkward/rkward/plugins/plots/pareto.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.js 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/rkward/plugins/plots/pareto.js 2011-06-06 12:31:58 UTC (rev 3677)
@@ -44,10 +44,10 @@
}
echo ('try ({\n');
- echo (' descriptives <- pareto.chart(x' + getValue ("plotoptions.code.printout") + ')\n');
- if (full && descriptives) {
- echo (' rk.results(data.frame(descriptives))\n');
- }
+ echo ('\t');
+ if (full && descriptives) echo ('descriptives <- ');
+ echo ('pareto.chart(x' + getValue ("plotoptions.code.printout") + ')\n');
+ if (full && descriptives) echo (' rk.results(data.frame(descriptives))\n');
echo ('})\n');
if (full) {
echo ('rk.graph.off ()\n');
Modified: trunk/rkward/rkward/plugins/plots/pareto.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.xml 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/rkward/plugins/plots/pareto.xml 2011-06-06 12:31:58 UTC (rev 3677)
@@ -11,13 +11,15 @@
<connect client="x.enabled" governor="tabulate.checked.not"/>
<connect client="tabulate_options.varsource.selected" governor="vars.selected" />
<set id="tabulate_options.titlevar" to="title" />
-
- <connect client="plotoptions.default_ylab" governor="tabulate_options.fun_label" />
<script><![CDATA[
gui.addChangeCommand ("tabulate.checked", "updateFunLabel ()");
+ gui.addChangeCommand ("tabulate_options.fun_label", "updateFunLabel ()");
updateFunLabel = function () {
- var tabulate = gui.getValue ("tabulate.checked");
- if (!tabulate) gui.setValue ("tabulate_options.fun_label", quote ("Frequency"));
+ if (gui.getValue ("tabulate.checked")) {
+ gui.setValue ("plotoptions.default_ylab", gui.getValue ("tabulate_options.fun_label"));
+ } else {
+ gui.setValue ("plotoptions.default_ylab", quote ("Frequency"));
+ }
}
updateFunLabel ();
]]></script>
@@ -28,6 +30,7 @@
<row>
<varselector id="vars"/>
<column>
+ <text id="dummy" initial="---"/>
<frame id="tabulate" label="Tabulate data before plotting" checkable="true" checked="false">
<embed id="tabulate_options" component="rkward::one_var_tabulation" as_button="false" label="Tabulation Options"/>
</frame>
Modified: trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js
===================================================================
--- trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js 2011-06-05 20:40:06 UTC (rev 3676)
+++ trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js 2011-06-06 12:31:58 UTC (rev 3677)
@@ -28,7 +28,9 @@
}
this.getValue = function (id) {
- return (_rkward.getValue (this.absoluteId (id)));
+ var ret = _rkward.getValue (this.absoluteId (id));
+ if (ret == "0") return (false);
+ return (ret);
}
this.setValue = function (id, value) {
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