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

nono_231 at users.sourceforge.net nono_231 at users.sourceforge.net
Sat Feb 24 08:48:55 UTC 2007


Revision: 1466
          http://svn.sourceforge.net/rkward/?rev=1466&view=rev
Author:   nono_231
Date:     2007-02-24 00:48:55 -0800 (Sat, 24 Feb 2007)

Log Message:
-----------
Added tabulate option for vars in pareto plugin

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/plots/pareto.php
    trunk/rkward/rkward/plugins/plots/pareto.xml

Modified: trunk/rkward/rkward/plugins/plots/pareto.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.php	2007-02-24 07:37:13 UTC (rev 1465)
+++ trunk/rkward/rkward/plugins/plots/pareto.php	2007-02-24 08:48:55 UTC (rev 1466)
@@ -28,12 +28,19 @@
 function doPrintout ($final) {
 	$vars = getRK_val ("x");
 	$descriptives = getRK_val ("descriptives")=="TRUE";
-?>
-rk.temp.x <- (<? echo ($vars); ?>)
-if(!is.table(rk.temp.x)) {
-       rk.temp.x <- table(rk.temp.x)
-} 
+	$tabulate= getRK_val ("tabulate")=="TRUE";
 
+if($tabulate) {?>
+rk.temp.x <- table (<? echo ($vars); ?>, exclude=NULL)
+<?      } else { ?>
+rk.temp.x <- <? echo ($vars); ?>
+
+if (!is.numeric (rk.temp.x)) {
+       rk.print ("Data may not be numeric, but proceeding as requested.\nDid you
+forget to check the tabulate option?")
+}
+<?      } ?>
+
 <?	if ($final) { ?>
 rk.header ("Pareto chart")
 

Modified: trunk/rkward/rkward/plugins/plots/pareto.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.xml	2007-02-24 07:37:13 UTC (rev 1465)
+++ trunk/rkward/rkward/plugins/plots/pareto.xml	2007-02-24 08:48:55 UTC (rev 1466)
@@ -14,6 +14,7 @@
 				<row>
 					<varselector id="vars"/>
 					<column>
+					<checkbox id="tabulate" label="Tabulate for factor variables" value="TRUE" value_unchecked="FALSE" checked="false" />
 					<varslot min_vars="1" id="x" source="vars" required="true" label="Vector or Factor"/>
 					<checkbox id="descriptives" label="Print descriptives" value="TRUE" value_unchecked="FALSE" checked="true"/>
 					<preview id="preview"/>


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