[rkward-cvs] SF.net SVN: rkward: [1702] trunk/rkward/rkward/plugins/distributions/tests

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Mar 22 19:08:48 UTC 2007


Revision: 1702
          http://svn.sourceforge.net/rkward/?rev=1702&view=rev
Author:   tfry
Date:     2007-03-22 12:08:48 -0700 (Thu, 22 Mar 2007)

Log Message:
-----------
Combine length and NA options

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/distributions/tests/ad_test.php
    trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php
    trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php
    trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php
    trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/sf_test.php
    trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php
    trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml

Modified: trunk/rkward/rkward/plugins/distributions/tests/ad_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/ad_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/ad_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -15,9 +15,7 @@
 	var <- eval (vars[[i]], envir=globalenv ())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- ad.test (var)

Modified: trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -21,8 +21,7 @@
 				</row>
 			</tab>
 			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>

Modified: trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -15,9 +15,7 @@
 	var <- eval (vars[[i]], envir=globalenv ())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- cvm.test (var)

Modified: trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -21,8 +21,7 @@
 				</row>
 			</tab>
 			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>

Modified: trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -15,9 +15,7 @@
 	var <- eval (vars[[i]], envir=globalenv())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- lillie.test (var)

Modified: trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -21,8 +21,7 @@
 				</row>
 			</tab>
 			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>

Modified: trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -16,9 +16,7 @@
 	var <- eval (vars[[i]], envir=globalenv ())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- pearson.test (var, <? echo $adjust; ?>)

Modified: trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -25,8 +25,7 @@
 					<option value="adjust = TRUE" label="n.classes-3 degrees of freedom" />
 					<option value="adjust = FALSE" label="n.classes-1 degrees of freedom" />
 				</radio>
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>

Modified: trunk/rkward/rkward/plugins/distributions/tests/sf_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/sf_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/sf_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -15,9 +15,7 @@
 	var <- eval (vars[[i]], envir=globalenv())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- sf.test (var)

Modified: trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -21,8 +21,7 @@
 				</row>
 			</tab>
 			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>

Modified: trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php	2007-03-22 19:08:48 UTC (rev 1702)
@@ -13,9 +13,7 @@
 	var <- eval (vars[[i]], envir=globalenv())
 <?	if (getRK_val ("length")) { ?>
 	results[i, 'Length'] <- length (var)
-<?	}
-	if (getRK_val ("nacount")) { ?>
-	results[i, 'NAs'] <- length (which(is.na(var)))
+	results[i, 'NAs'] <- sum (is.na(var))
 <?	} ?>
 	try ({
 		test <- shapiro.test (var)

Modified: trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml	2007-03-22 17:36:47 UTC (rev 1701)
+++ trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml	2007-03-22 19:08:48 UTC (rev 1702)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 
-<!-- This is the Shapiro-Wilk’s test for Normality -->
+<!-- This is the Shapiro-Wilk test for Normality -->
 
 <document>
 	<code file="shapiro_test.php"/>
@@ -21,8 +21,7 @@
 				</row>
 			</tab>
 			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="length" label="Show Length and NAs" value_unchecked="0" value="1" checked="true" />
 				<stretch/>
 			</tab>
 		</tabbook>


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