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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Mar 3 10:19:05 UTC 2010


Revision: 2757
          http://rkward.svn.sourceforge.net/rkward/?rev=2757&view=rev
Author:   tfry
Date:     2010-03-03 10:19:04 +0000 (Wed, 03 Mar 2010)

Log Message:
-----------
Convert another bunch of plugins to JS

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.js
    trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.xml
    trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.js
    trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.js
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.js
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.js
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/moment.js
    trunk/rkward/rkward/plugins/analysis/moments/moment.xml
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.js
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml
    trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.js
    trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.xml
    trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.js
    trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml
    trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.js
    trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml
    trunk/rkward/rkward/plugins/analysis/outliers/outlier.js
    trunk/rkward/rkward/plugins/analysis/outliers/outlier.xml
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.js
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml
    trunk/rkward/rkward/plugins/analysis/time_series/Box_test.js
    trunk/rkward/rkward/plugins/analysis/time_series/Box_test.xml
    trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.js
    trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.xml
    trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.js
    trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.xml
    trunk/rkward/rkward/plugins/analysis/variances/F_test.js
    trunk/rkward/rkward/plugins/analysis/variances/F_test.xml
    trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.js
    trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml
    trunk/rkward/rkward/plugins/analysis/variances/fligner_test.js
    trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml
    trunk/rkward/rkward/plugins/analysis/variances/levene_test.js
    trunk/rkward/rkward/plugins/analysis/variances/levene_test.xml
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.js
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.xml
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.js
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.xml
    trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.js
    trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.xml
    trunk/rkward/rkward/plugins/distributions/beta_probabilities.js
    trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/beta_quantiles.js
    trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/binomial_quantiles.js
    trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.js
    trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.js
    trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.js
    trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.js
    trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.js
    trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/exponential_probabilities.js
    trunk/rkward/rkward/plugins/distributions/exponential_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/exponential_quantiles.js
    trunk/rkward/rkward/plugins/distributions/exponential_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/f_probabilities.js
    trunk/rkward/rkward/plugins/distributions/f_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/f_quantiles.js
    trunk/rkward/rkward/plugins/distributions/f_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/gamma_probabilities.js
    trunk/rkward/rkward/plugins/distributions/gamma_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/gamma_quantiles.js
    trunk/rkward/rkward/plugins/distributions/gamma_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/geom_probabilities.js
    trunk/rkward/rkward/plugins/distributions/geom_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/geom_quantiles.js
    trunk/rkward/rkward/plugins/distributions/geom_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.js
    trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.js
    trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.js
    trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.js
    trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.xml

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.php
    trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.php
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php
    trunk/rkward/rkward/plugins/analysis/moments/moment.php
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php
    trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php
    trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php
    trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php
    trunk/rkward/rkward/plugins/analysis/outliers/outlier.php
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php
    trunk/rkward/rkward/plugins/analysis/time_series/Box_test.php
    trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.php
    trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.php
    trunk/rkward/rkward/plugins/analysis/variances/F_test.php
    trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php
    trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php
    trunk/rkward/rkward/plugins/analysis/variances/levene_test.php
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.php
    trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.php
    trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.php

Modified: trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
-
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
-
 	echo ('objects <- list (' + vars + ')\n');
 	echo ('results <- data.frame (\'Variable Name\'=rep (NA, length (objects)), check.names=FALSE)\n');
 	echo ('for (i in 1:length (objects)) {\n');

Deleted: trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,40 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-objects <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-for (i in 1:length (objects)) {
-	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
-	var <- eval (objects[[i]], envir=globalenv ())
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-<?	}
-	if (getRK_val ("narm")) { ?>
-	var <- var[!is.na (var)] 	# remove NAs
-<?	} ?>
-	try ({
-		test <- PP.test (var, lshort = <? getRK ("lshort"); ?>)
-		results[i, 'Dickey-Fuller'] <- test$statistic
-		results[i, 'Truncation lag parameter'] <- test$parameter
-		results[i, 'p-value'] <- test$p.value
-	})
-}
-<?
-}
-
-function printout () {
-?>
-rk.header ("Phillips-Perron Test for Unit Roots",
-	parameters=list ("Truncation lag parameter short ('TRUE') or long ('FALSE')", "<? getRK ("lshort"); ?>"))
-
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/PP_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="PP_test.php"/>
+	<code file="PP_test.js"/>
 	<help file="PP_test.rkh"/>
 	
 	<dialog label="Phillips-Perron Test for Unit Roots">

Modified: trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,13 +1,3 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
-
 function calculate () {
 	echo ('result <- mood.test (' + getValue ("x") + ', ' + getValue ("y") + ', alternative = "' + getValue ("alternative") + '")\n');
 }

Deleted: trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,24 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-?>
-result <- mood.test (<? getRK ("x"); ?>, <? getRK ("y"); ?>, alternative = "<? getRK ("alternative"); ?>")
-<?
-}
-
-function printout () {
-?>
-names <- rk.get.description (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
-
-rk.header (result$method,
-	parameters=list ("Alternative Hypothesis", rk.describe.alternative (result)))
-
-rk.results (list (
-	'Variables'=names,
-	'Z'=result$statistic,
-	'p-value'=result$p.value))
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/TESTS/mood_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="mood_test.php"/>
+	<code file="mood_test.js"/>
 	<help file="mood_test.rkh"/>
 	
 	<dialog label="Mood Two-Sample Test of Scale">

Modified: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,20 +1,12 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var alternative;
-var undefined;
 
 function preprocess () {
 	echo ('require(moments)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 	alternative = getValue ("alternative");
 
 	echo ('\n');

Deleted: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,48 +0,0 @@
-<?
-function preprocess () { ?>
-require(moments)
-<?
-}
-
-function calculate () {
-	global $alternative;
-
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";	$alternative = getRK_val ("alternative");
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-	var <- eval (vars[[i]], envir=globalenv ())
-	results[i, 'Error'] <- tryCatch ({
-		# This is the core of the calculation
-		t <- agostino.test (var, alternative = "<? echo ($alternative); ?>")
-		results[i, 'skewness estimator (skew)'] <- t$statistic["skew"]
-		results[i, 'transformation (z)'] <- t$statistic["z"]
-		results[i, 'p-value'] <- t$p.value
-<? 	if (getRK_val ("show_alternative")) { ?>
-		results[i, 'Alternative Hypothesis'] <- rk.describe.alternative (t)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-<? 	} ?>
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-	global $alternative;
-?>
-rk.header ("D'Agostino test of skewness",
-	parameters=list ("Alternative Hypothesis", "<? echo ($alternative); ?>"))
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="agostino_test.php"/>	
+	<code file="agostino_test.js"/>
 	<help file="agostino_test.rkh" />
 	
 	<dialog label="D'Agostino test of skewness">

Modified: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,20 +1,12 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var alternative;
-var undefined;
 
 function preprocess () {
 	echo ('require(moments)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 	alternative = getValue ("alternative");
 
 	echo ('vars <- list (' + vars + ')\n');

Deleted: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,46 +0,0 @@
-<?
-function preprocess () { ?>
-require(moments)
-<?
-}
-
-function calculate () {
-	global $alternative;
-
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-	$alternative = getRK_val ("alternative");
-?>
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-	var <- eval (vars[[i]], envir=globalenv ())
-	results[i, 'Error'] <- tryCatch ({
-		t <- anscombe.test (var, alternative = "<? echo ($alternative); ?>")
-		results[i, 'Kurtosis estimator (tau)'] <- t$statistic["kurt"]
-		results[i, 'Transformation (z)'] <- t$statistic["z"]
-		results[i, 'p-value'] <- t$p.value
-<? 	if (getRK_val ("show_alternative")) { ?>
-		results[i, 'Alternative Hypothesis'] <- rk.describe.alternative (t)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-<? 	} ?>
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-	global $alternative;
-?>
-rk.header ("Anscombe-Glynn test of kurtosis",
-	parameters=list ("Alternative Hypothesis", "<? echo ($alternative); ?>"))
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="anscombe_test.php"/>	
+	<code file="anscombe_test.js"/>	
 	<help file="anscombe_test.rkh" />
 	
 	<dialog label="Anscombe-Glynn test of kurtosis">

Modified: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,20 +1,12 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var alternative;
-var undefined;
 
 function preprocess () {
 	echo ('require(moments)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 	alternative = getValue ("alternative");
 
 	echo ('\n');

Deleted: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,47 +0,0 @@
-<?
-function preprocess () {
-?>
-require(moments)
-<?}
-
-function calculate () {
-	global $alternative;
-
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-	$alternative = getRK_val ("alternative");
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-	var <- eval (vars[[i]], envir=globalenv ())
-	results[i, 'Error'] <- tryCatch ({
-		t <- bonett.test (var, alternative = "<? echo ($alternative); ?>")
-		results[i, 'Kurtosis estimator (tau)'] <- t$statistic["tau"]
-		results[i, 'Transformation (z)'] <- t$statistic["z"]
-		results[i, 'p-value'] <- t$p.value
-<? 	if (getRK_val ("show_alternative")) { ?>
-		results[i, 'Alternative Hypothesis'] <- rk.describe.alternative (t)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- length (which(is.na(var)))
-<? 	} ?>
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-	global $alternative;
-?>
-rk.header ("Bonett-Seier test of Geary's kurtosis",
-	parameters=list ("Alternative Hypothesis", "<? echo ($alternative); ?>"))
-rk.results (results)
-<?
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="bonett_test.php"/>	
+	<code file="bonett_test.js"/>	
 	<help file="bonett_test.rkh" />
 	
 	<dialog label="Bonett-Seier test of Geary's kurtosis">

Modified: trunk/rkward/rkward/plugins/analysis/moments/moment.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,21 +1,10 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(moments)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
-
 	echo ('\n');
 	echo ('objects <- list (' + vars + ')\n');
 	echo ('results <- data.frame (\'Variable Name\'=rep (NA, length (objects)), check.names=FALSE)\n');

Deleted: trunk/rkward/rkward/plugins/analysis/moments/moment.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,35 +0,0 @@
-<?
-function preprocess () { ?>
-require(moments)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-
-objects <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-for (i in 1:length (objects)) {
-	var <- eval (objects[[i]], envir=globalenv ())
-	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
-
-	try (results[i, 'Moment'] <- moment (var, order = <? getRK ("order"); ?>, central = <? getRK ("central"); ?>, absolute = <? getRK ("absolute"); ?>, na.rm = <? getRK ("narm"); ?>))
-<?	if (getRK_val ("length")) { ?>
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-<?	} ?>
-}
-<?
-}
-
-function printout () {
-?>
-rk.header ("Statistical Moment",
-	parameters=list ("Order", "<? getRK ("order"); ?>", "Compute central moments", "<? getRK ("central"); ?>", "Compute absolute moments", "<? getRK ("absolute"); ?>", "Remove missing values", "<? getRK ("narm"); ?>"))
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/moments/moment.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="moment.php"/>	
+	<code file="moment.js"/>
 	<help file="moment.rkh" />
 	
 	<dialog label="sample moment">

Modified: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,26 +1,14 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(moments)\n');
 }
 
 function calculate () {
-	var vars = "";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 	var narm = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
 	if (getValue ("narm")) narm = ", na.rm=TRUE";
-	else narm = ", na.rm=FALSE"
+	else narm = ", na.rm=FALSE";
 
-
-		            echo ('objects <- list (' + vars + ')\n');
+        echo ('objects <- list (' + vars + ')\n');
 	echo ('results <- data.frame (\'Variable Name\'=rep (NA, length (objects)), check.names=FALSE)\n');
 	echo ('for (i in 1:length (objects)) {\n');
 	echo ('	var <- eval (objects[[i]], envir=globalenv ())\n');
@@ -45,8 +33,8 @@
 	}
 	echo ('}\n');
 }
+
 function printout () {
 	echo ('rk.header ("Skewness and Kurtosis")\n');
 	echo ('rk.results (results)\n');
 }
-

Deleted: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,46 +0,0 @@
-<?
-function preprocess () { ?>
-require(moments)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-	if (getRK_val ("narm")) $narm = ", na.rm=TRUE";
-	else $narm = ", na.rm=FALSE"
-
-?>
-objects <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-for (i in 1:length (objects)) {
-	var <- eval (objects[[i]], envir=globalenv ())
-	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
-
-	try ({
-<?
-	if (getRK_val ("skewness")) { ?>
-		results[i, 'Skewness'] <- skewness (var<? echo ($narm); ?>)
-<?	}
-	if (getRK_val ("kurtosis")) { ?>
-		results[i, 'Kurtosis'] <- kurtosis (var<? echo ($narm); ?>)
-		results[i, 'Excess Kurtosis'] <- results[i, 'Kurtosis'] - 3
-<?	}
-	if (getRK_val ("geary")) { ?>
-		results[i, 'Geary Kurtosis'] <- geary (var<? echo ($narm); ?>)
-<?	} ?>
-	})
-<?	if (getRK_val ("length")) { ?>
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-<?	} ?>
-}
-<?
-}
-function printout () {
-?>
-rk.header ("Skewness and Kurtosis")
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,9 +1,6 @@
 <!DOCTYPE rkplugin>
-
-<!-- This is the skewness and kurtosis plug-in-->
-
 <document>
-	<code file="skewness_kurtosis_test.php"/>
+	<code file="skewness_kurtosis_test.js"/>
 	<help file="skewness_kurtosis_test.rkh" />
 	<dialog label="Skewness and Kurtosis">
 		<tabbook>

Modified: trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,19 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(outliers)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
 	echo ('\n');
 	echo ('vars <- list (' + vars + ')\n');

Deleted: trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,55 +0,0 @@
-<?
-function preprocess () { ?>
-require(outliers)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-<?	if (getRK_val ("length")) { ?>
-	var <- eval (vars[[i]], envir=globalenv ())
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-	var <- na.omit (var) 	# omit NAs for all further calculations
-<? 	} else { ?>
-	var <- na.omit (eval (vars[[i]], envir=globalenv ()))
-<?	} ?>
-
-	results[i, 'Error'] <- tryCatch ({
-		# This is the core of the calculation
-		t <- chisq.out.test (var, opposite = <? getRK ("opposite"); ?>)
-		results[i, 'X-squared'] <- t$statistic
-		results[i, 'p-value'] <- t$p.value
-		results[i, 'Alternative Hypothesis']<- rk.describe.alternative (t)
-		results[i, 'Variance'] <- var (var)
-<?	if (getRK_val ("descriptives")) { ?>
-		results[i, 'Mean'] <- mean (var)
-		results[i, 'Standard Deviation'] <- sd (var)
-		results[i, 'Median'] <- median (var)
-		results[i, 'Minimum'] <- min (var)
-		results[i, 'Maximum'] <- max (var)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-?>
-rk.header ("Chi-squared test for outlier",
-	parameters=list ("Opposite", "<? getRK ("opposite"); ?>"))
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="chisq_out_test.php"/>
+	<code file="chisq_out_test.js"/>
 	<help file="chisq_out_test.rkh"/>
 	
 	<dialog label="Chi-squared test for outlier">

Modified: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,19 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(outliers)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
 	echo ('\n');
 	echo ('vars <- list (' + vars + ')\n');

Deleted: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,54 +0,0 @@
-<?
-function preprocess () { ?>
-require(outliers)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-<?	if (getRK_val ("length")) { ?>
-	var <- eval (vars[[i]], envir=globalenv ())
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-	var <- na.omit (var) 	# omit NAs for all further calculations
-<? 	} else { ?>
-	var <- na.omit (eval (vars[[i]], envir=globalenv ()))
-<?	} ?>
-
-	results[i, 'Error'] <- tryCatch ({
-		# This is the core of the calculation
-		t <- dixon.test (var, type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
-		results[i, 'Dixon Q-statistic'] <- t$statistic["Q"]
-		results[i, 'p-value'] <- t$p.value
-		results[i, 'Alternative Hypothesis']<- rk.describe.alternative (t)
-<?	if (getRK_val ("descriptives")) { ?>
-		results[i, 'Mean'] <- mean (var)
-		results[i, 'Standard Deviation'] <-  sd (var)
-		results[i, 'Median'] <- median (var)
-		results[i, 'Minimum'] <- min (var)
-		results[i, 'Maximum'] <- max (var)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-?>
-rk.header ("Dixon test for outlier",
-	parameters=list ("Type", "<? getRK ("type"); ?>", "Opposite", "<? getRK ("opposite"); ?>", "two-sided", "<? getRK ("two_sided"); ?>"))
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="dixon_test.php"/>
+	<code file="dixon_test.js"/>
 	<help file="dixon_test.rkh"/>
 	
 	<dialog label="Dixon tests for outlier">

Modified: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,19 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(outliers)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
 	echo ('\n');
 	echo ('vars <- list (' + vars + ')\n');

Deleted: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,55 +0,0 @@
-<?
-function preprocess () { ?>
-require(outliers)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-<?	if (getRK_val ("length")) { ?>
-	var <- eval (vars[[i]], envir=globalenv ())
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-	var <- na.omit (var) 	# omit NAs for all further calculations
-<? 	} else { ?>
-	var <- na.omit (eval (vars[[i]], envir=globalenv ()))
-<?	} ?>
-
-	results[i, 'Error'] <- tryCatch ({
-		# This is the core of the calculation
-		t <- grubbs.test (var, type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
-		results[i, 'G'] <- t$statistic["G"]
-		results[i, 'U'] <- t$statistic["U"]
-		results[i, 'p-value'] <- t$p.value
-		results[i, 'Alternative Hypothesis']<- rk.describe.alternative (t)
-<?	if (getRK_val ("descriptives")) { ?>
-		results[i, 'Mean'] <- mean (var)
-		results[i, 'Standard Deviation'] <- sd (var)
-		results[i, 'Median'] <- median (var)
-		results[i, 'Minimum'] <- min (var)
-		results[i, 'Maximum'] <- max (var)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-?>
-rk.header ("Grubbs tests for one or two outliers in data sample",
-	parameters=list ("Type", "<? getRK ("type"); ?>", "Opposite", "<? getRK ("opposite"); ?>", "two-sided", "<? getRK ("two_sided"); ?>"))
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="grubbs_test.php"/>
+	<code file="grubbs_test.js"/>
 	<help file="grubbs_test.rkh"/>
 	
 	<dialog label="Grubbs tests for one or two outliers in data sample">

Modified: trunk/rkward/rkward/plugins/analysis/outliers/outlier.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/outlier.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/outlier.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,19 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(outliers)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
 	echo ('\n');
 	echo ('vars <- list (' + vars + ')\n');

Deleted: trunk/rkward/rkward/plugins/analysis/outliers/outlier.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/outlier.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/outlier.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,52 +0,0 @@
-<?
-function preprocess () { ?>
-require(outliers)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-?>
-
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (vars)), check.names=FALSE)
-for (i in 1:length(vars)) {
-	results[i, 'Variable Name'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-<?	if (getRK_val ("length")) { ?>
-	var <- eval (vars[[i]], envir=globalenv ())
-
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-	var <- na.omit (var) 	# omit NAs for all further calculations
-<? 	} else { ?>
-	var <- na.omit (eval (vars[[i]], envir=globalenv ()))
-<?	} ?>
-
-	results[i, 'Error'] <- tryCatch ({
-		# This is the core of the calculation
-		t <- outlier (var, opposite = <? getRK ("opposite"); ?>)
-		results[i, 'Outlier'] <- t
-<?	if (getRK_val ("descriptives")) { ?>
-		results[i, 'Mean'] <- mean (var)
-		results[i, 'Standard Deviation'] <- sd (var)
-		results[i, 'Median'] <- median (var)
-		results[i, 'Minimum'] <- min (var)
-		results[i, 'Maximum'] <- max (var)
-<?	} ?>
-		NA				# no error
-	}, error=function (e) e$message)	# catch any errors
-}
-if (all (is.na (results$'Error'))) results$'Error' <- NULL
-<?
-}
-
-function printout () {
-?>
-rk.header ("Find potential outlier",
-	parameters=list ("Opposite", "<? getRK ("opposite"); ?>"))
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/outliers/outlier.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/outlier.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/outliers/outlier.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="outlier.php"/>
+	<code file="outlier.js"/>
 	<help file="outlier.rkh"/>
 	
 	<dialog label="Find value with largest difference from the mean">

Modified: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
 function calculate () {
-	var vars = "";
+	var vars = trim (getValue ("x")).replace (/\n/g, " + ");
 	var intercept = "";
-	vars = str_replace ("\n", " + ", trim (getValue ("x")));
 	if (!getValue ("intercept.state.numeric")) intercept = "0 + ";
 
 	echo ('results <- summary.lm (lm (' + getValue ("y") + ' ~ ' + intercept + vars + '))\n');

Deleted: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,19 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	$vars = str_replace ("\n", " + ", trim (getRK_val ("x")));
-	if (!getRK_val ("intercept.state.numeric")) $intercept = "0 + ";
-?>
-results <- summary.lm (lm (<? getRK ("y"); ?> ~ <? echo ($intercept . $vars); ?>))
-<?
-}
-
-function printout () {
-?>
-rk.header ("Linear Regression")
-rk.print(results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="linear_regression.php"/>
+	<code file="linear_regression.js"/>
 	<help file="linear_regression.rkh"/>
 
 	<dialog label="Fitting Linear Models">

Modified: trunk/rkward/rkward/plugins/analysis/time_series/Box_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/Box_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/Box_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
-
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
-
 	echo ('objects <- list (' + vars + ')\n');
 	echo ('results <- data.frame (\'Variable Name\'=rep (NA, length (objects)), check.names=FALSE)\n');
 	echo ('for (i in 1:length (objects)) {\n');

Deleted: trunk/rkward/rkward/plugins/analysis/time_series/Box_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/Box_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/Box_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,40 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-objects <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-for (i in 1:length (objects)) {
-	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
-	var <- eval (objects[[i]], envir=globalenv ())
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-<?	}
-	if (getRK_val ("narm")) { ?>
-	var <- var[!is.na (var)] 	# remove NAs
-<?	} ?>
-	try ({
-		test <- Box.test (var, lag = <? getRK ("lag"); ?>, type = "<? getRK ("type"); ?>")
-		results[i, 'X-squared'] <- test$statistic
-		results[i, 'degrees of freedom'] <- test$parameter
-		results[i, 'p-value'] <- test$p.value
-	})
-}
-<?
-}
-
-function printout () {
-?>
-rk.header ("<? getRK ("type"); ?> Test",
-	parameters=list ("lag", "<? getRK ("lag"); ?>", "type", "<? getRK ("type"); ?>"))
-
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/time_series/Box_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/Box_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/Box_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="Box_test.php"/>
+	<code file="Box_test.js"/>
 	<help file="Box_test.rkh"/>
 	
 	<dialog label="Box-Pierce and Ljung-Box Tests">

Modified: trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,27 +1,10 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
 function printout () {
 	var lambda = "";
-	var upcol = "";
-	var uplty = "";
-	var uplab = "";
-	var downlab = "";
-	if (getValue("custom") == 0)
+	if (getValue("custom") == 0) {
 		lambda = getValue ("lambda");
-	else
+	} else {
 		lambda = getValue ("clambda");
+	}
 
 	echo ('rk.header ("Hodrick-Prescott Filter", parameters=list("Lambda", ' +  lambda + '))\n');
 	echo ('x <- get("' + getValue("x") + '", envir=globalenv())\n');
@@ -37,57 +20,64 @@
 	echo ('	cycle <- ts(cycle,start(x),frequency=frequency(x))\n');
 	echo ('}\n');
 	if (getValue("create_trend") == 1) {
-
 		echo ('assign("' + getValue("trend_name") + '", trend, envir=globalenv())\n');
 	}
 	if (getValue("create_cycle") == 1) {
-
 		echo ('assign("' + getValue("cycle_name") + '", cycle, envir=globalenv())\n');
 	}
 
-	if (getValue("series_col.color") != "" & getValue("trend_col.color") != "")
+	var upcol = "";
+	if (getValue("series_col.color") != "" & getValue("trend_col.color") != "") {
 		upcol = ", col=c(\"" + getValue("series_col.color") + "\", \"" + getValue("trend_col.color") + "\")";
-	elseif (getValue("series_col.color") != "")
-	upcol = ", col=c(\"" + getValue("series_col.color") + "\", \"black\")";
-	elseif (getValue("trend_col.color") != "")
-	upcol = ", col=c(\"black\", \"" + getValue("trend_col.color") + "\")";
-	else
+	} else if (getValue("series_col.color") != "") {
+		upcol = ", col=c(\"" + getValue("series_col.color") + "\", \"black\")";
+	} else if (getValue("trend_col.color") != "") {
+		upcol = ", col=c(\"black\", \"" + getValue("trend_col.color") + "\")";
+	} else {
 		upcol = "";
+	}
 
-	if (getValue("series_lty") != "" & getValue("trend_lty") != "")
+	var uplty = "";
+	if (getValue("series_lty") != "" & getValue("trend_lty") != "") {
 		uplty = ", lty=c(\"" + getValue("series_lty") + "\", \"" + getValue("trend_lty") + "\")";
-	elseif (getValue("series_lty") != "")
-	uplty = ", lty=c(\"" + getValue("series_lty") + "\", \"solid\")";
-	elseif (getValue("trend_lty") != "")
-	uplty = ", lty=c(\"solid\", \"" + getValue("trend_lty") + "\")";
-	else
+	} else if (getValue("series_lty") != "") {
+		uplty = ", lty=c(\"" + getValue("series_lty") + "\", \"solid\")";
+	} else if (getValue("trend_lty") != "") {
+		uplty = ", lty=c(\"solid\", \"" + getValue("trend_lty") + "\")";
+	} else {
 		uplty = "";
+	}
 
-	if (getValue("uplab.text") == "")
+	var uplab = "";
+	if (getValue("uplab.text") == "") {
 		uplab = "\"" + getValue("x") + ", Trend\"";
-	else if (getValue("uplabisquote") == 1)
+	} else if (getValue("uplabisquote") == 1) {
 		uplab = "\"" + getValue("uplab") + "\"";
-	else
+	} else {
 		uplab = getValue("uplab");
+	}
 
 	echo ('rk.graph.on ()\n');
 	echo ('try({\n');
 	echo ('	par(mfrow=c(');
-	if (getValue("plot_cycle") == 1) echo 2;
-	else echo ( 1 + ',1),mar=c(2,4,2,2)+0.1)\n');
+	if (getValue("plot_cycle") == 1) echo ("2");
+	else echo ("1");
+	echo (',1),mar=c(2,4,2,2)+0.1)\n');
 	echo ('	plot.ts(cbind(x, trend), ylab=' +  uplab +  upcol + ',lwd=c(' + getValue("series_lwd") + ',' + getValue("trend_lwd") + ')' +  uplty + ', plot.type="single")\n');
+	var downlab = "";
 	if (getValue("plot_cycle") == 1) {
-		if (getValue("downlab.text") == "")
+		if (getValue("downlab.text") == "") {
 			downlab = "\"Cycle\"";
-		else if (getValue("downlabisquote") == 1)
+		} else if (getValue("downlabisquote") == 1) {
 			downlab = "\"" + getValue("downlab") + "\"";
-		else
+		} else {
 			downlab = getValue("downlab");
+		}
 
 		echo ('	plot.ts(cycle, ylab=' +  downlab);
-		if (getValue("cycle_col.color") != "") echo ", col=\"" + getValue("cycle_col.color") + "\"";
+		if (getValue("cycle_col.color") != "") echo (", col=\"" + getValue("cycle_col.color") + "\"");
 		echo (', lwd=' + getValue("cycle_lwd"));
-		if (getValue("cycle_lty") != "") echo ", lty=\"" + getValue("cycle_lty") + "\"";
+		if (getValue("cycle_lty") != "") echo (", lty=\"" + getValue("cycle_lty") + "\"");
 		echo (')\n');
 	}
 

Deleted: trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,87 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-}
-
-function printout () {
-	if (getRK_val("custom") == 0)
-		$lambda = getRK_val ("lambda");
-	else
-		$lambda = getRK_val ("clambda");
-?>
-rk.header ("Hodrick-Prescott Filter", parameters=list("Lambda", <? echo $lambda; ?>))
-x <- get("<? getRK("x"); ?>", envir=globalenv())
-lambda <- <? echo $lambda . "\n"; ?>
-
-if (any (is.na (x))) stop ("Missing values cannot be handled")
-
-i <- diag(length(x))
-trend <- solve(i + lambda * crossprod(diff(i, lag=1, d=2)), x) # The HP Filter itself. Thanks to Grant V. Farnsworth
-cycle <- x - trend
-if (is.ts(x)) {
-	trend <- ts(trend,start(x),frequency=frequency(x))
-	cycle <- ts(cycle,start(x),frequency=frequency(x))
-}
-<?
-	if (getRK_val("create_trend") == 1) {
-?>
-assign("<? getRK("trend_name"); ?>", trend, envir=globalenv())
-<?
-	} 
-	if (getRK_val("create_cycle") == 1) {
-?>
-assign("<? getRK("cycle_name"); ?>", cycle, envir=globalenv())
-<?
-	}
-
-	if (getRK_val("series_col.color") != "" & getRK_val("trend_col.color") != "")
-		$upcol = ", col=c(\"" . getRK_val("series_col.color") . "\", \"" . getRK_val("trend_col.color") . "\")";
-	elseif (getRK_val("series_col.color") != "")
-		$upcol = ", col=c(\"" . getRK_val("series_col.color") . "\", \"black\")";
-	elseif (getRK_val("trend_col.color") != "")
-		$upcol = ", col=c(\"black\", \"" . getRK_val("trend_col.color") . "\")";
-	else
-		$upcol = "";
-
-	if (getRK_val("series_lty") != "" & getRK_val("trend_lty") != "")
-		$uplty = ", lty=c(\"" . getRK_val("series_lty") . "\", \"" . getRK_val("trend_lty") . "\")";
-	elseif (getRK_val("series_lty") != "")
-		$uplty = ", lty=c(\"" . getRK_val("series_lty") . "\", \"solid\")";
-	elseif (getRK_val("trend_lty") != "")
-		$uplty = ", lty=c(\"solid\", \"" . getRK_val("trend_lty") . "\")";
-	else
-		$uplty = "";
-
-	if (getRK_val("uplab.text") == "")
-		$uplab = "\"" . getRK_val("x") . ", Trend\"";
-	else
-		if (getRK_val("uplabisquote") == 1)		
-			$uplab = "\"" . getRK_val("uplab") . "\"";
-		else
-			$uplab = getRK_val("uplab");
-?>
-rk.graph.on ()
-try({
-	par(mfrow=c(<?if (getRK_val("plot_cycle") == 1) echo 2; else echo 1;?>,1),mar=c(2,4,2,2)+0.1)
-	plot.ts(cbind(x, trend), ylab=<? echo $uplab; echo $upcol; ?>,lwd=c(<? getRK("series_lwd"); ?>,<? getRK("trend_lwd"); ?>)<? echo $uplty; ?>, plot.type="single")
-<?
-	if (getRK_val("plot_cycle") == 1) {
-		if (getRK_val("downlab.text") == "") 
-			$downlab = "\"Cycle\"";
-		else
-			if (getRK_val("downlabisquote") == 1)	
-				$downlab = "\"" . getRK_val("downlab") . "\"";
-			else
-				$downlab = getRK_val("downlab");
-?>
-	plot.ts(cycle, ylab=<? echo $downlab; if (getRK_val("cycle_col.color") != "") echo ", col=\"" . getRK_val("cycle_col.color") . "\""; ?>, lwd=<? getRK("cycle_lwd"); if (getRK_val("cycle_lty") != "") echo ", lty=\"" . getRK_val("cycle_lty") . "\""; ?>)
-<?
-	}
-?>
-})
-rk.graph.off ()
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/hp_filter.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="hp_filter.php"/>
+	<code file="hp_filter.js"/>
 	<help file="hp_filter.rkh" />
 	<logic>
 		<connect client="lambda.enabled" governor="custom.state.not"/>

Modified: trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,22 +1,10 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require (tseries)\n');
 }
 
 function calculate () {
-	var vars = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 
-
 	echo ('objects <- list (' + vars + ')\n');
 	echo ('results <- data.frame (\'Variable Name\'=rep (NA, length (objects)), check.names=FALSE)\n');
 	echo ('for (i in 1:length (objects)) {\n');
@@ -32,7 +20,7 @@
 	}
 	echo ('	try ({\n');
 	echo ('		test <- kpss.test (var, null = "' + getValue ("null") + '", lshort = ' + getValue ("lshort") + ')\n');
-	echo ('		results[i, \'KPSS ' + getValue ("null")) echo ('\'] <- test$statistic\n');
+	echo ('		results[i, \'KPSS ' + getValue ("null") + '\'] <- test$statistic\n');
 	echo ('		results[i, \'Truncation lag parameter\'] <- test$parameter\n');
 	echo ('		results[i, \'p-value\'] <- test$p.value\n');
 	echo ('	})\n');

Deleted: trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,42 +0,0 @@
-<?
-function preprocess () { ?>
-require (tseries)
-<?
-}
-
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-objects <- list (<? echo ($vars); ?>)
-results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
-for (i in 1:length (objects)) {
-	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
-	var <- eval (objects[[i]], envir=globalenv ())
-<?	if (getRK_val ("length")) { ?>
-	results[i, 'Length'] <- length (var)
-	results[i, 'NAs'] <- sum (is.na(var))
-
-<?	}
-	if (getRK_val ("narm")) { ?>
-	var <- var[!is.na (var)] 	# remove NAs
-<?	} ?>
-	try ({
-		test <- kpss.test (var, null = "<? getRK ("null"); ?>", lshort = <? getRK ("lshort"); ?>)
-		results[i, 'KPSS <? getRK ("null") ?>'] <- test$statistic
-		results[i, 'Truncation lag parameter'] <- test$parameter
-		results[i, 'p-value'] <- test$p.value
-	})
-}
-<?
-}
-
-function printout () {
-?>
-rk.header ("KPSS Test for Level Stationarity",
-	parameters=list ("null hypothesis"="<? getRK ("null"); ?>", "version of truncation lag parameter"="<? if (getRK_val ("lshort") == "TRUE") echo ("short"); else echo ("long"); ?>"))
-
-rk.results (results)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/time_series/kpss_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,8 +1,6 @@
 <!DOCTYPE rkplugin>
-
-
 <document>
-	<code file="kpss_test.php"/>
+	<code file="kpss_test.js"/>
 	<help file="kpss_test.rkh"/>
 	
 	<dialog label="KPSS Test for Stationarity">

Modified: trunk/rkward/rkward/plugins/analysis/variances/F_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,7 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
 function calculate () {
-	var conflevel = "";
 	echo ('result <- var.test (' + getValue ("x") + ', ' + getValue ("y") + ', alternative = "' + getValue ("alternative") + '", ratio = ' + getValue ("ratio"));
-	if ((conflevel = getValue ("conflevel")) != "0.95") echo (", conf.level=" + conflevel);
+	var conflevel = getValue ("conflevel");
+	if (conflevel != "0.95") echo (", conf.level=" + conflevel);
 	echo (')\n');
 	echo ('\n');
 }

Deleted: trunk/rkward/rkward/plugins/analysis/variances/F_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,32 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-
-?>
-result <- var.test (<? getRK ("x"); ?>, <? getRK ("y"); ?>, alternative = "<? getRK ("alternative"); ?>", ratio = <? getRK ("ratio"); ?><?
-if (($conflevel = getRK_val ("conflevel")) != "0.95") echo (", conf.level=" . $conflevel); ?>)
-
-<?
-}
-
-function printout () {
-?>
-names <- rk.get.description (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
-
-rk.header (result$method,
-	parameters=list ("Confidence Level", "<? getRK ("conflevel"); ?>", "Alternative Hypothesis", rk.describe.alternative(result)))
-
-rk.results (list (
-	'Variables'=names,
-	'F'=result$statistic["F"],
-	'Numerator DF'=result$parameter["num df"],
-	'Denominator DF'=result$parameter["denom df"],
-	'p-value'=result$p.value,
-	'Lower CI'=result$conf.int[1],
-	'Upper CI'=result$conf.int[2],
-	'ratio of variances'=result$estimate))
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/variances/F_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="F_test.php"/>
+	<code file="F_test.js"/>
 	<help file="F_test.rkh"/>
 	
 	<dialog label="F test">

Modified: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var vars;
-var undefined;
 
-
 function calculate () {
-	vars = str_replace ("\n", ", ", trim (getValue ("x")));
+	vars = trim (getValue ("x")).replace (/\n/g, ", ");
 
 	echo ('result <- bartlett.test (list (' + vars + '))\n');
 }

Deleted: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,27 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	global $vars;
-	$vars = str_replace ("\n", ", ", trim (getRK_val ("x")));
-?>
-result <- bartlett.test (list (<? echo ($vars); ?>))
-<?
-}
-
-function printout () {
-	global $vars;
-?>
-names <- rk.get.description (<? echo ($vars); ?>)
-
-rk.header (result$method)
-
-rk.results (list (
-	'Variables'=names,
-	'Bartlett s K-squared'=result$statistic,
-	'df'=result$parameter,
-	'p-value'=result$p.value))
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="bartlett_test.php"/>
+	<code file="bartlett_test.js"/>
 	<help file="bartlett_test.rkh"/>
 	
 	<dialog label="Bartlett Test of Homogeneity of Variances">

Modified: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var vars;
-var undefined;
 
-
 function calculate () {
-	vars = str_replace ("\n", ", ", trim (getValue ("x")));
+	vars = trim (getValue ("x")).replace (/\n/g, ", ");
 
 	echo ('result <- fligner.test (list (' + vars + '))\n');
 }

Deleted: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,28 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	global $vars;
-	$vars = str_replace ("\n", ", ", trim (getRK_val ("x")));
-?>
-result <- fligner.test (list (<? echo ($vars); ?>))
-<?
-}
-
-function printout () {
-	global $vars;
-?>
-names <- rk.get.description (<? echo ($vars); ?>)
-
-rk.header (result$method)
-
-rk.results (list (
-	'Variables'=names,
-	'Fligner-Killeen:med X^2 test statistic'=result$statistic,
-	'df'=result$parameter,
-	'p-value'=result$p.value))
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="fligner_test.php"/>
+	<code file="fligner_test.js"/>
 	<help file="fligner_test.rkh"/>
 	
 	<dialog label="Fligner-Killeen Test of Homogeneity of Variances">

Modified: trunk/rkward/rkward/plugins/analysis/variances/levene_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/levene_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/levene_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,12 +1,3 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	echo ('require(car)\n');
 }

Deleted: trunk/rkward/rkward/plugins/analysis/variances/levene_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/levene_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/levene_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,22 +0,0 @@
-<?
-function preprocess () { ?>
-require(car)
-<?}
-
-function calculate () {
-
-?>
-result <- levene.test (<? getRK ("y"); ?>, <? getRK ("group"); ?>)
-<?
-}
-
-function printout () {
-?>
-names <- rk.get.description (<? getRK ("y"); ?>, <? getRK ("group"); ?>)
-
-rk.header ("Levene's Test", list ("response variable", names[1], "groups", names[2]))
-
-rk.print (result)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/variances/levene_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/levene_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/variances/levene_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,15 @@
 <!DOCTYPE rkplugin>
-
 <document>
-	<code file="levene_test.php"/>
+	<code file="levene_test.js"/>
 	<help file="levene_test.rkh"/>
 	
 	<dialog label="Levene's Test">
 		<row>
 			<varselector id="vars"/>
-				<column>
-					<varslot type="numeric" id="y" source="vars" required="true" label="response variable"/>
-					<varslot type="factor" id="group" source="vars" required="true" label="groups"/>
-				</column>
+			<column>
+				<varslot type="numeric" id="y" source="vars" required="true" label="response variable"/>
+				<varslot type="factor" id="group" source="vars" required="true" label="groups"/>
+			</column>
 		</row>
 	</dialog>
 	

Modified: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,15 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
 // globals
 var y;
-var undefined;
 
 function preprocess () {
 	y = getValue ("y");
@@ -21,18 +11,17 @@
 }
 
 function calculate () {
-	var exact_setting = "";
+	var exact_setting = getValue ("exact");
 	var exact_opt = "";
-	var paired_opt = "";
-	var conflevel = "";
-	var conflevel_opt = "";
-	exact_setting = getValue ("exact");
 	if (exact_setting == "yes") {
 		exact_opt = ", exact=TRUE";
 	} else if (exact_setting == "no") {
 		exact_opt = ", exact=FALSE";
 	}
+	var paired_opt = "";
 	if (y != "") paired_opt = ", paired = " + getValue ("paired");
+	var conflevel = "";
+	var conflevel_opt = "";
 	if (getValue ("confint") == "TRUE") {
 		if ((conflevel = getValue("conflevel")) != "0.95") conflevel_opt = ", conf.level=" + conflevel;
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,53 +0,0 @@
-<?
-function preprocess () {
-	global $y;
-	$y = getRK_val ("y");
-	if ($y != "") $y = ", " . $y;
-?>
-require(exactRankTests)
-
-names = rk.get.description (<? getRK ("x"); echo ($y); ?>)
-<?
-}
-
-function calculate () {
-	global $y;
-
-	$exact_setting = getRK_val ("exact");
-	if ($exact_setting == "yes") {
-		$exact_opt = ", exact=TRUE";
-	} else if ($exact_setting == "no") {
-		$exact_opt = ", exact=FALSE";
-	}
-	if ($y != "") $paired_opt = ", paired = " . getRK_val ("paired");
-	if (getRK_val ("confint") == "TRUE") {
-		if (($conflevel = getRK_val("conflevel")) != "0.95") $conflevel_opt = ", conf.level=" . $conflevel;
-	}
-?>
-result <- wilcox.exact (<? getRK ("x"); echo ($y); ?>, alternative = "<? getRK ("alternative"); ?>", mu = <? getRK ("mu"); echo ($paired_opt); echo ($exact_opt); ?>, correct = <? getRK ("correct"); ?>, conf.int = <? getRK ("confint"); echo ($conflevel_opt); ?>)
-
-<?
-}
-
-function printout () {
-?>
-rk.header (result$method,
-	parameters=list ("Comparing", paste (names, collapse=" against "),
-	"H1", rk.describe.alternative (result),
-	"Continuity correction in normal approximation for p-value", "<? getRK ("correct"); ?>",
-	"Compute exact p-value", "<? getRK ("exact"); ?>", "Paired test", "<? getRK ("paired"); ?>",
-	"mu", "<? getRK ("mu"); ?>"))
-
-rk.results (list (
-	'Variable Names'=names,
-	'statistic'=result$statistic,
-	'Location Shift'=result$null.value,
-	'Hypothesis'=result$alternative,
-	p=result$p.value<?
-	if (getRK_val ("confint") == "TRUE") { ?>,
-	'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
-	'confidence interval of difference'=result$conf.int,
-	'Difference in Location' = result$estimate<? } ?>))
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_exact_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="wilcoxon_exact_test.php"/>
+	<code file="wilcoxon_exact_test.js"/>
 	<help file="wilcoxon_exact_test.rkh"/>
 
 	<logic>

Modified: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,15 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
 // globals
 var y;
-var undefined;
 
 function preprocess () {
 	y = getValue ("y");
@@ -19,18 +9,17 @@
 }
 
 function calculate () {
-	var exact_setting = "";
+	var exact_setting = getValue ("exact");
 	var exact_opt = "";
-	var paired_opt = "";
-	var conflevel = "";
-	var conflevel_opt = "";
-	exact_setting = getValue ("exact");
 	if (exact_setting == "yes") {
 		exact_opt = ", exact=TRUE";
 	} else if (exact_setting == "no") {
 		exact_opt = ", exact=FALSE";
 	}
+	var paired_opt = "";
 	if (y != "") paired_opt = ", paired = " + getValue ("paired");
+	var conflevel = "";
+	var conflevel_opt = "";
 	if (getValue ("confint") == "TRUE") {
 		if ((conflevel = getValue("conflevel")) != "0.95") conflevel_opt = ", conf.level=" + conflevel;
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,51 +0,0 @@
-<?
-function preprocess () {
-	global $y;
-	$y = getRK_val ("y");
-	if ($y != "") $y = ", " . $y;
-?>
-names = rk.get.description (<? getRK ("x"); echo ($y); ?>)
-<?
-}
-
-function calculate () {
-	global $y;
-
-	$exact_setting = getRK_val ("exact");
-	if ($exact_setting == "yes") {
-		$exact_opt = ", exact=TRUE";
-	} else if ($exact_setting == "no") {
-		$exact_opt = ", exact=FALSE";
-	}
-	if ($y != "") $paired_opt = ", paired = " . getRK_val ("paired");
-	if (getRK_val ("confint") == "TRUE") {
-		if (($conflevel = getRK_val("conflevel")) != "0.95") $conflevel_opt = ", conf.level=" . $conflevel;
-	}
-?>
-result <- wilcox.test (<? getRK ("x"); echo ($y); ?>, alternative = "<? getRK ("alternative"); ?>", mu = <? getRK ("mu"); echo ($paired_opt); echo ($exact_opt); ?>, correct = <? getRK ("correct"); ?>, conf.int = <? getRK ("confint"); echo ($conflevel_opt); ?>)
-
-<?
-}
-
-function printout () {
-?>
-rk.header (result$method,
-	parameters=list ("Comparing", paste (names, collapse=" against "),
-	"H1", rk.describe.alternative (result),
-	"Continuity correction in normal approximation for p-value", "<? getRK ("correct"); ?>",
-	"Compute exact p-value", "<? getRK ("exact"); ?>", "Paired test", "<? getRK ("paired"); ?>",
-	"mu", "<? getRK ("mu"); ?>"))
-
-rk.results (list (
-	'Variable Names'=names,
-	'statistic'=result$statistic,
-	'Location Shift'=result$null.value,
-	'Hypothesis'=result$alternative,
-	p=result$p.value<?
-	if (getRK_val ("confint") == "TRUE") { ?>,
-	'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
-	'confidence interval of difference'=result$conf.int,
-	'Difference in Location' = result$estimate<? } ?>))
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/analysis/wilcoxon/wilcoxon_test.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="wilcoxon_test.php"/>
+	<code file="wilcoxon_test.js"/>
 	<help file="wilcoxon_test.rkh"/>
 
 	<logic>

Modified: trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.js
===================================================================
--- trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,24 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
 // globals
 var mad_type;
 var constMad;
-var undefined;
 
-
 function calculate () {
-	var vars = "";
-	var trim = "";
-	vars = "substitute (" + str_replace ("\n", "), substitute (", trim (getValue ("x"))) + ")";
-	trim = getValue ("trim"); //the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed
+	var vars = "substitute (" + trim (getValue ("x")).replace (/\n/g, "), substitute (") + ")";
 	constMad = getValue ("constMad");
 	mad_type = getValue ("mad_type");
 
@@ -31,7 +16,8 @@
 	echo ('\n');
 	echo ('	# we wrap each single call in a "try" statement to always continue on errors.\n');
 	if (getValue ("mean")) {
-		echo ('	results[i, \'mean\'] <- try (mean (var, trim = ' + trim + ', na.rm=TRUE))\n');
+		// trim is the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed
+		echo ('	results[i, \'mean\'] <- try (mean (var, trim = ' + getValue ("trim") + ', na.rm=TRUE))\n');
 	}
 	if (getValue ("median")) {
 		echo ('	results[i, \'median\'] <- try (median (var, na.rm=TRUE))\n');
@@ -55,7 +41,7 @@
 	if (getValue ("mad")) {
 		echo ('	results[i, \'Median Absolute Deviation\'] <- try (mad (var, constant = ' + constMad);
 		if (mad_type == "low") echo (", low=TRUE");
-		elseif (mad_type == "high") echo (", high=TRUE");
+		else if (mad_type == "high") echo (", high=TRUE");
 		echo (', na.rm=TRUE))\n');
 	}
 	if (getValue ("length")) {
@@ -73,7 +59,7 @@
 		echo ('               "Median Absolute Deviation",\n');
 		echo ('               paste ("constant:", ' + constMad + ', ');
 		if (mad_type == "low") echo ('"lo-median"');
-		elseif (mad_type == "high") echo ('"hi-median"');
+		else if (mad_type == "high") echo ('"hi-median"');
 		else echo ('"average"' + ')');
 	}
 	echo ('))\n');

Deleted: trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.php
===================================================================
--- trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.php	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.php	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,74 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-	global $mad_type;
-	global $constMad;
-
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-	$trim = getRK_val ("trim"); //the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed
-	$constMad = getRK_val ("constMad");
-	$mad_type = getRK_val ("mad_type");
-
-?>
-vars <- list (<? echo ($vars); ?>)
-results <- data.frame ('Object'=rep (NA, length (vars)))
-for (i in 1:length (vars)) {
-	results[i, 'Object'] <- rk.get.description (vars[[i]], is.substitute=TRUE)
-	var <- eval (vars[[i]], envir=globalenv())	# fetch the real object
-
-	# we wrap each single call in a "try" statement to always continue on errors.
-<?
-	if (getRK_val ("mean")) { ?>
-	results[i, 'mean'] <- try (mean (var, trim = <?echo ($trim) ;?>, na.rm=TRUE))
-<?	}
-	if (getRK_val ("median")) { ?>
-	results[i, 'median'] <- try (median (var, na.rm=TRUE))
-<?	}
-	if (getRK_val ("range")) { ?>
-	try ({
-		range <- try (range (var, na.rm=TRUE))
-		results[i, 'min'] <- range[1]
-		results[i, 'max'] <- range[2]
-	})
-<?	}
-	if (getRK_val ("sd")) { ?>
-	results[i, 'standard deviation'] <- try (sd (var, na.rm=TRUE))
-<?	}
-	if (getRK_val ("sum")) { ?>
-	results[i, 'sum'] <- try (sum (var, na.rm=TRUE))
-<?	}
-	if (getRK_val ("prod")) { ?>
-	results[i, 'product'] <- try (prod (var, na.rm=TRUE))
-<?	}
-	if (getRK_val ("mad")) { ?>
-	results[i, 'Median Absolute Deviation'] <- try (mad (var, constant = <? echo ($constMad);
-		if ($mad_type == "low") echo (", low=TRUE");
-		elseif ($mad_type == "high") echo (", high=TRUE"); ?>, na.rm=TRUE))
-<?	}
-	if (getRK_val ("length")) { ?>
-	results[i, 'length of sample'] <- length (var)
-	results[i, 'number of NAs'] <- sum (is.na(var))
-<?	} ?>
-}
-<?
-}
-	
-function printout () {
-	global $mad_type;
-	global $constMad;
-?>
-rk.header ("Descriptive statistics", parameters=list (
-               "Trim of mean", <?getRK ("trim") ;?><? if (getRK_val ("mad")) { ?>,
-               "Median Absolute Deviation",
-               paste ("constant:", <?echo ($constMad) ;?>, <?
-	if ($mad_type == "low") echo ('"lo-median"');
-	elseif ($mad_type == "high") echo ('"hi-median"');
-	else echo ('"average"'); ?>)<? } ?>))
-
-rk.results (results)
-<?
-}
-
-?>

Modified: trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.xml
===================================================================
--- trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/descriptive/descriptive_statistics.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,7 +1,6 @@
 <!DOCTYPE rkplugin>
-<!-- This is a simple example, of how a "plugin" might be configured. -->
 <document>
-	<code file="descriptive_statistics.php" />
+	<code file="descriptive_statistics.js" />
 	<help file="descriptive_statistics.rkh" />
 
 	<dialog label="Descriptive Statistics" >

Modified: trunk/rkward/rkward/plugins/distributions/beta_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/beta_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pbeta (q = ' + q + ', shape1 = ' + getValue ("shape1") + ', shape2 = ' + getValue ("shape2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="beta_probabilities.php" />
+	<code file="beta_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/>

Modified: trunk/rkward/rkward/plugins/distributions/beta_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/beta_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
-
 	echo ('result <- (qbeta (p = ' + p + ', shape1 = ' + getValue ("shape1") + ', shape2 = ' + getValue ("shape2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }
 

Modified: trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="beta_quantiles.php" />
+	<code file="beta_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/>

Modified: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qbinom (p = ' + p + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="binomial_quantiles.php" />
+	<code file="binomial_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="integer" initial="1" id="size" min="1" label="Binomial trials"/>

Modified: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pbinom (q = ' + q + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="binomial_tail_probabilities.php" />
+	<code file="binomial_tail_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="integer" initial="1" id="size" min="1" label="Binomial trials"/>

Modified: trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pcauchy (q = ' + q + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="cauchy_probabilities.php" />
+	<code file="cauchy_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="0" id="location" label="Location"/>

Modified: trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qcauchy (p = ' + p + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="cauchy_quantiles.php" />
+	<code file="cauchy_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="0" id="location" label="Location"/>

Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pchisq (q = ' + q + ', df = ' + getValue ("df") + ',  ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="chi_squared_probabilities.php" />
+	<code file="chi_squared_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>

Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qchisq (p = ' + p + ', df = ' + getValue ("df") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="chi_squared_quantiles.php" />
+	<code file="chi_squared_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>

Modified: trunk/rkward/rkward/plugins/distributions/exponential_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/exponential_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,18 +1,9 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
-
 	echo ('result <- (pexp (q = ' + q + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }
 

Modified: trunk/rkward/rkward/plugins/distributions/exponential_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/exponential_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="exponential_probabilities.php" />
+	<code file="exponential_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="vector of rates"/>

Modified: trunk/rkward/rkward/plugins/distributions/exponential_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/exponential_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qexp (p = ' + p + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/exponential_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/exponential_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="exponential_quantiles.php" />
+	<code file="exponential_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="vector of rates"/>

Modified: trunk/rkward/rkward/plugins/distributions/f_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/f_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pf (q = ' + q + ', df1 = ' + getValue ("df1") + ', df2 = ' + getValue ("df2") + ',  ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/f_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/f_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="f_probabilities.php" />
+	<code file="f_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>

Modified: trunk/rkward/rkward/plugins/distributions/f_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/f_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qf (p = ' + p + ', df1 = ' + getValue ("df1") + ', df2 = ' + getValue ("df2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/f_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/f_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="f_quantiles.php" />
+	<code file="f_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>

Modified: trunk/rkward/rkward/plugins/distributions/gamma_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/gamma_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pgamma (q = ' + q + ', shape = ' + getValue ("shape") + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/gamma_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/gamma_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="gamma_probabilities.php" />
+	<code file="gamma_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/>

Modified: trunk/rkward/rkward/plugins/distributions/gamma_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/gamma_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qgamma (p = ' + p + ', shape = ' + getValue ("shape") + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 	echo ('\n');

Modified: trunk/rkward/rkward/plugins/distributions/gamma_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/gamma_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="gamma_quantiles.php" />
+	<code file="gamma_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/>

Modified: trunk/rkward/rkward/plugins/distributions/geom_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/geom_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (pgeom (q = ' + q + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/geom_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_probabilities.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/geom_probabilities.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="geom_probabilities.php" />
+	<code file="geom_probabilities.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="probability of success in each trial"/>

Modified: trunk/rkward/rkward/plugins/distributions/geom_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_quantiles.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/geom_quantiles.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var p;
-var undefined;
 
-
 function calculate () {
-	p = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("p")) + ")";
+	p = "c (" + getValue ("p").replace (/[, ]+/g, ", ") + ")";
 
 	echo ('result <- (qgeom (p = ' + p + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 }

Modified: trunk/rkward/rkward/plugins/distributions/geom_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_quantiles.xml	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/geom_quantiles.xml	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="geom_quantiles.php" />
+	<code file="geom_quantiles.js" />
 	<snippets>
 		<snippet id="dist_options">
 			<spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="probability of success in each trial"/>

Modified: trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.js	2010-02-25 21:55:54 UTC (rev 2756)
+++ trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.js	2010-03-03 10:19:04 UTC (rev 2757)
@@ -1,16 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var q;
-var undefined;
 
-
 function calculate () {
-	q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
+	q = "c (" + getValue ("q").replace (/[, ]+/g, ", ") + ")";
 

@@ Diff output truncated at 100000 characters. @@

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