[rkward-cvs] SF.net SVN: rkward: [1059] trunk/rkward/rkward/plugins/distributions/ ad_test.php
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Jan 4 01:04:27 UTC 2007
Revision: 1059
http://svn.sourceforge.net/rkward/?rev=1059&view=rev
Author: tfry
Date: 2007-01-03 17:04:27 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
Explicitly setting the titles in the output is redundant, and can be removed by given better names to the fields
Modified Paths:
--------------
trunk/rkward/rkward/plugins/distributions/ad_test.php
Modified: trunk/rkward/rkward/plugins/distributions/ad_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/ad_test.php 2007-01-04 00:58:20 UTC (rev 1058)
+++ trunk/rkward/rkward/plugins/distributions/ad_test.php 2007-01-04 01:04:27 UTC (rev 1059)
@@ -11,17 +11,17 @@
rk.temp.options <- list (dolength=<? getRK ("length"); ?>, donacount=<? getRK ("nacount"); ?>)
rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame (object=rep (NA, length (rk.temp.vars)))
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)))
i=0;
for (rk.temp.var in rk.temp.vars) {
i = i+1
- rk.temp.results$object[i] <- rk.get.description (rk.temp.var, is.substitute=TRUE)
- if (rk.temp.options$dolength) try (rk.temp.results$length[i] <- length (eval (rk.temp.var)))
- if (rk.temp.options$donacount) try (rk.temp.results$nacount[i] <- length (which(is.na(eval (rk.temp.var)))))
+ rk.temp.results$'Variable Name'[i] <- rk.get.description (rk.temp.var, is.substitute=TRUE)
+ if (rk.temp.options$dolength) try (rk.temp.results$'Length'[i] <- length (eval (rk.temp.var)))
+ if (rk.temp.options$donacount) try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (rk.temp.var)))))
rk.temp.test <- ad.test (eval (rk.temp.var))
- rk.temp.results$statistic[i] <- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
- rk.temp.results$p.value[i] <- rk.temp.test$p.value
+ rk.temp.results$'Statistic'[i] <- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+ rk.temp.results$'p-value'[i] <- rk.temp.test$p.value
}
<?
@@ -31,7 +31,7 @@
?>
rk.header ("Anderson-Darling Normality Test")
-rk.results (rk.temp.results, titles=c ("Variable Name", if (rk.temp.options$dolength) "Length", if (rk.temp.options$donacount) "NAs", "Statistic", "p-value"))
+rk.results (rk.temp.results)
<?
}
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