[rkward-cvs] SF.net SVN: rkward:[2632] trunk/rkward/rkward/plugins/analysis

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Sep 1 11:02:17 UTC 2009


Revision: 2632
          http://rkward.svn.sourceforge.net/rkward/?rev=2632&view=rev
Author:   tfry
Date:     2009-09-01 11:02:17 +0000 (Tue, 01 Sep 2009)

Log Message:
-----------
Add option not to exclude missing values.

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.php
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.php	2009-08-26 09:49:42 UTC (rev 2631)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.php	2009-09-01 11:02:17 UTC (rev 2632)
@@ -2,20 +2,20 @@
 function preprocess () {
 $vars = str_replace ("\n", ",", trim (getRK_val ("x"))) ;
 ?>
-data <- data.frame (<? echo ($vars); ?>)
+data <- data.frame (<? echo ($vars); ?>, check.names=FALSE)
 datadescription <- paste (rk.get.description (<? echo ($vars); ?>), collapse=", ");
 <?
 }
 
 function calculate () {
 ?>
-result <- ftable (data);
+result <- ftable (data<? if (!getRK_val ("exclude_nas.state")) echo (", exclude=NULL"); ?>);
 <?
 }
 
 function printout () {
 ?>
-rk.header ("Crosstabs (n to n)", parameters=list ("Variables", datadescription))
+rk.header ("Crosstabs (n to n)", parameters=list ("Variables"=datadescription))
 
 rk.print (result)
 <?

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh	2009-08-26 09:49:42 UTC (rev 2631)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh	2009-09-01 11:02:17 UTC (rev 2632)
@@ -12,6 +12,7 @@
 
 	<settings>
 		<setting id="x">Select a data frame or more than one variables from a data frame or with the same length</setting>
+		<setting id="exclude_nas">Should NA (and NaN) values be excluded (default)? If this option is not checked, missing values are listed in the table just like regular values.</setting>
 	</settings>
 	<related>
 		<ul>

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml	2009-08-26 09:49:42 UTC (rev 2631)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml	2009-09-01 11:02:17 UTC (rev 2632)
@@ -8,6 +8,7 @@
 			<varselector id="vars"/>
 			<column>
 				<varslot min_vars="1" multi="true" id="x" source="vars" required="true" label="variables:"/>
+				<checkbox id="exclude_nas" label="Exclude missing values" checked="true"/>
 			</column>
 		</row>
 	</dialog>


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