[rkward-cvs] SF.net SVN: rkward: [1963] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Sep 17 15:57:24 UTC 2007


Revision: 1963
          http://rkward.svn.sourceforge.net/rkward/?rev=1963&view=rev
Author:   tfry
Date:     2007-09-17 08:57:23 -0700 (Mon, 17 Sep 2007)

Log Message:
-----------
Some standardization for crosstab_multi, and cross-references to crosstab

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/plugins/analysis/crosstab.php
    trunk/rkward/rkward/plugins/analysis/crosstab.rkh
    trunk/rkward/rkward/plugins/analysis/crosstab.xml
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.php
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh
    trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml
    trunk/rkward/rkward/plugins/under_development.pluginmap

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/ChangeLog	2007-09-17 15:57:23 UTC (rev 1963)
@@ -13,9 +13,9 @@
 - some complex plotting plugins now start up noticeably faster
 - fixed: sometimes detecting created X11() windows would fail, esp. under high load
 - create the workspace browser only when it is first shown
-- support for including files and snippets in xml files		TODO: use more
+- support for including files and snippets in xml files
 - all file selection line edits gain filename-completion
-- add a basic file selector window				TODO: add window activation shortcut
+- add a basic file selector window
 - show the focus indication (thin red border) also for detached windows
 - tool windows can be closed and detached in the same way as regular windows
 - fix a crash with detached tool windows

Modified: trunk/rkward/rkward/plugins/analysis/crosstab.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.php	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.php	2007-09-17 15:57:23 UTC (rev 1963)
@@ -46,7 +46,7 @@
 function doPrintout ($final) {
 	if ($final) { ?>
 for (i in 1:length (results)) {
-	rk.header ("Crosstabs", parameters=list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']]))
+	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']]))
 	rk.print (xtable (cbind (results[[i]]), digits=0))
 <?		if (getRK_val ("chisq") == "TRUE") { ?>
 

Modified: trunk/rkward/rkward/plugins/analysis/crosstab.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.rkh	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.rkh	2007-09-17 15:57:23 UTC (rev 1963)
@@ -6,6 +6,8 @@
 
 	<usage>
 Specify the "dependent" variable. This variable will be present in all created tables. Specify one or more "independent" variables. Each of these will be cross-tabulated against the "dependent" variable. "Dependent" and "Independent", here, does not imply any inferential statistics. In each table, the occurrence of combinations of values in the "dependent" and "independent" variable is counted.
+
+For complete crosstabulation of three or more variables against each other (into a single table), use <link href="rkward://component/crosstab_multi"/>.
 	</usage>
 
 	<settings>
@@ -25,6 +27,7 @@
 	</settings>
 	<related>
 		<ul>
+			<li><link href="rkward://component/crosstab_multi"/></li>
 			<li><link href="rkward://component/barplot"/></li>
 			<li><link href="rkward://rhelp/table"/></li>
 			<li><link href="rkward://rhelp/chisq.test"/></li>

Modified: trunk/rkward/rkward/plugins/analysis/crosstab.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.xml	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.xml	2007-09-17 15:57:23 UTC (rev 1963)
@@ -11,7 +11,7 @@
 		<convert id="montecarlo" mode="equals" sources="simpv.string" standard="TRUE" />
 		<connect client="B.enabled" governor="montecarlo" />
 	</logic>
-	<dialog label="Crosstabs" >
+	<dialog label="N to 1 Crosstabulation" >
 		<tabbook>
 			<tab label="Variables" id="variables_tab">
 				<row>

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.php	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.php	2007-09-17 15:57:23 UTC (rev 1963)
@@ -1,18 +1,23 @@
 <?
 function preprocess () {
+$vars = str_replace ("\n", ",", trim (getRK_val ("x"))) ;
+?>
+data <- data.frame (<? echo ($vars); ?>)
+datadescription <- paste (rk.get.description (<? echo ($vars); ?>), collapse=", ");
+<?
 }
 
 function calculate () {
+?>
+result <- ftable (data);
+<?
 }
 
 function printout () {
-$vars = str_replace ("\n", ",", trim (getRK_val ("x"))) ;
 ?>
-data <- data.frame (<? echo ($vars); ?>)
+rk.header ("Crosstabs (n to n)", parameters=list ("Variables", datadescription))
 
-rk.print (ftable(data))
+rk.print (result)
 <?
 }
 ?>
-
-	

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.rkh	2007-09-17 15:57:23 UTC (rev 1963)
@@ -1,19 +1,21 @@
 <!DOCTYPE rkhelp>
 <document>
 	<summary>
-Multiple Crosstabulation where all the variables are crosstabulated with all the others.
+Multiple crosstabulation where all the variables are crosstabulated with all the others.
 	</summary>
 
 	<usage>
 Choose one or more objects to be crosstabulated.
+
+For the case of two variables, or when the occurrences of values should be counted only for one "dependent" variable, <link href="rkward://component/crosstab"/> may be more appropriate, and offers more options.
 	</usage>
 
 	<settings>
-		<caption id="tab_variables"/>
-		<setting id="x">Select a data frame or more than one variables from a data frame or with the same length </setting>		
+		<setting id="x">Select a data frame or more than one variables from a data frame or with the same length</setting>
 	</settings>
 	<related>
 		<ul>
+			<li><link href="rkward://component/crosstab"/></li>
 			<li><link href="rkward://rhelp/ftable"/></li>
 		</ul>
 	</related>

Modified: trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/analysis/crosstab_multi.xml	2007-09-17 15:57:23 UTC (rev 1963)
@@ -3,17 +3,13 @@
 	<code file="crosstab_multi.php" />
 	<help file="crosstab_multi.rkh" />
 
-	<dialog label="Multiple Crosstabulation" >
-		<tabbook>
-			<tab label="Variables" id="tab_variables">		
-				<row>
-					<varselector id="vars"/>
-					<column>
-						<varslot min_vars="1" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
-					</column>
-				</row>
-			</tab>
-		</tabbook>
+	<dialog label="N to N Crosstabulation" >
+		<row>
+			<varselector id="vars"/>
+			<column>
+				<varslot min_vars="1" multi="true" id="x" source="vars" required="true" label="variables:"/>
+			</column>
+		</row>
 	</dialog>
 
 </document>

Modified: trunk/rkward/rkward/plugins/under_development.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/under_development.pluginmap	2007-09-17 15:23:40 UTC (rev 1962)
+++ trunk/rkward/rkward/plugins/under_development.pluginmap	2007-09-17 15:57:23 UTC (rev 1963)
@@ -2,8 +2,8 @@
 
 <document base_prefix="" namespace="rkward">
 	<components>
-		<component type="standard" id="crosstab" file="analysis/crosstab.xml" label="One to one" />
-		<component type="standard" id="mcrosstab" file="analysis/crosstab_multi.xml" label="Multiple" />
+		<component type="standard" id="crosstab" file="analysis/crosstab.xml" label="N to 1 Crosstabulation" />
+		<component type="standard" id="crosstab_multi" file="analysis/crosstab_multi.xml" label="N to N Crosstabulation" />
 		<component type="standard" id="piechart" file="plots/piechart.xml" label="Piechart" />
 		<component type="standard" id="dotchart" file="plots/dotchart.xml" label="Dotchart" />
 		<component type="standard" id="Box_test" file="analysis/time_series/Box_test.xml" label="Box–Pierce or Ljung–Box Tests" />
@@ -21,7 +21,7 @@
 		<menu id="analysis" label="Analysis" index="4">
 			<menu id="crosstabs" label="Crosstabs" index="11">			
 				<entry component="crosstab" />
-				<entry component="mcrosstab" />
+				<entry component="crosstab_multi" />
 			</menu>
 			<menu id="regression" label="Regression" index="7">
 				<entry component="linear_regression"/>


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