[rkward-cvs] SF.net SVN: rkward:[3771] trunk/rkward/rkward/plugins
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Sep 14 10:50:58 UTC 2011
Revision: 3771
http://rkward.svn.sourceforge.net/rkward/?rev=3771&view=rev
Author: tfry
Date: 2011-09-14 10:50:58 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
Add parameter description for tabulation
Modified Paths:
--------------
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
Modified: trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh
===================================================================
--- trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh 2011-09-14 08:43:02 UTC (rev 3770)
+++ trunk/rkward/rkward/plugins/data/one_var_tabulation.rkh 2011-09-14 10:50:58 UTC (rev 3771)
@@ -33,6 +33,7 @@
<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>
+ <li><i>parameters</i>: This property will be set to a string describing the tabulation options, suitable for pasting into the "parameters" argument of rk.header().</li>
</ul>
The generated code is available from <i>code.calculate</i>.
</technical>
Modified: trunk/rkward/rkward/plugins/data/one_var_tabulation.xml
===================================================================
--- trunk/rkward/rkward/plugins/data/one_var_tabulation.xml 2011-09-14 08:43:02 UTC (rev 3770)
+++ trunk/rkward/rkward/plugins/data/one_var_tabulation.xml 2011-09-14 10:50:58 UTC (rev 3771)
@@ -6,6 +6,7 @@
<external id="outvar" default="x"/>
<external id="titlevar" default=""/>
<external id="fun_label" default=""Frequency""/>
+ <external id="parameters"/>
<set id="varsource.visible" to="false"/>
@@ -32,8 +33,15 @@
}
}
gui.setValue ("fun_label", quote (label));
+ updateDescription ();
}
- ]]></script>
+
+ gui.addChangeCommand ("groups.available", "updateDescription ()");
+ updateDescription = function () {
+ gui.setValue ("parameters", '"Tabulation groups"=paste (names (groups), collapse=" by "), "Statistic"=' + gui.getValue ("fun_label"));
+ }
+ updateFunLabel ();
+ ]]></script>
</logic>
<dialog label="Tabulate" >
<varselector id="varsource"/> <!-- dummy varselector is currently needed to allow the embedding component to connect its own varselector -->
Modified: trunk/rkward/rkward/plugins/plots/pareto.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.js 2011-09-14 08:43:02 UTC (rev 3770)
+++ trunk/rkward/rkward/plugins/plots/pareto.js 2011-09-14 10:50:58 UTC (rev 3771)
@@ -32,8 +32,12 @@
var descriptives = getValue ("descriptives")=="TRUE";
if (full) {
- echo ('rk.header ("Pareto chart")\n');
+ echo ('rk.header ("Pareto chart", parameters=list (');
+ if (getValue ("tabulate.checked")) echo (getValue ('tabulate_options.parameters'));
+ else echo ('"Variable"=title');
+ echo ('))\n');
echo ('\n');
+
echo ('rk.graph.on ()\n');
}
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