[rkward-cvs] SF.net SVN: rkward: [1644] trunk/rkward/rkward/plugins/analysis/moments/ agostino_test.php
sjar at users.sourceforge.net
sjar at users.sourceforge.net
Mon Mar 19 21:35:44 UTC 2007
Revision: 1644
http://svn.sourceforge.net/rkward/?rev=1644&view=rev
Author: sjar
Date: 2007-03-19 14:35:43 -0700 (Mon, 19 Mar 2007)
Log Message:
-----------
instead of:
i = 0
for (object in objects) {
i = i+1
var <- eval(object)
# ...
}
following way is used from now on:
for (i in 1:length(objects)) {
var <- eval(objects[[i]])
# ...
}
Modified Paths:
--------------
trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
Modified: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php 2007-03-19 21:09:09 UTC (rev 1643)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php 2007-03-19 21:35:43 UTC (rev 1644)
@@ -10,11 +10,10 @@
objects <- list (<? echo ($vars); ?>)
results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-i=0;
-for (var in objects) {
- i = i+1
- results[i, 'Variable Name'] <- rk.get.description (var, is.substitute=TRUE)
- var <- eval (var)
+
+for (i in 1:length(objects)) {
+ results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
+ var <- eval(objects[[i]])
results[i, 'Error'] <- tryCatch ({
# This is the core of the calculation
t <- agostino.test (var, alternative = "<? getRK ("alternative"); ?>")
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