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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Mar 3 20:55:35 UTC 2010


Revision: 2759
          http://rkward.svn.sourceforge.net/rkward/?rev=2759&view=rev
Author:   tfry
Date:     2010-03-03 20:55:33 +0000 (Wed, 03 Mar 2010)

Log Message:
-----------
Convert last bunch of plugins to JS (hooray\!)

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.js
    trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
    trunk/rkward/rkward/plugins/simple_anova/code.js
    trunk/rkward/rkward/plugins/simple_anova/description.xml

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.php
    trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.php
    trunk/rkward/rkward/plugins/simple_anova/code.php

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-shape1 <- <? echo(getRK_val ("a")); ?>; shape2 <- <? echo(getRK_val ("b")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- shape1/(shape1 + shape2);
-avg.var <- (shape1*shape2/((shape1+shape2)^2*(shape1+shape2+1)))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rbeta(n=<? echo ($nAvg*$nDist); ?>, shape1=shape1, shape2=shape2), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_beta_clt.php" />
+	<code file="plot_beta_clt.js" />
 	<help file="plot_beta_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-size <- <? echo(getRK_val ("size")); ?>; prob <- <? echo(getRK_val ("prob")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- size*prob;
-avg.var <- (size*prob*(1-prob))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rbinom(n=<? echo ($nAvg*$nDist); ?>, size=size, prob=prob), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_binomial_clt.php" />
+	<code file="plot_binomial_clt.js" />
 	<help file="plot_binomial_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 
@@ -17,11 +10,9 @@
 
 function doExpVar () {
 	if (getValue ("ncp") == 0) {
-
 		echo ('avg.exp <- df;\n');
 		echo ('avg.var <- (2*df)/' + nAvg + ';\n');
 	} else {
-
 		echo ('avg.exp <- df + ncp;\n');
 		echo ('avg.var <- (2*df + 4*ncp)/' + nAvg + ';\n');
 	}

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,33 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-df <- <? echo(getRK_val ("df")); ?>; ncp <- <? echo(getRK_val ("ncp")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-
-	if (getRK_val ("ncp") == 0) {
-?>
-avg.exp <- df;
-avg.var <- (2*df)/<? echo ($nAvg); ?>;
-<?
-	} else {
-?>
-avg.exp <- df + ncp;
-avg.var <- (2*df + 4*ncp)/<? echo ($nAvg); ?>;
-<?
-	}
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rchisq(n=<? echo ($nAvg*$nDist); ?>, df=df, ncp=ncp), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_chi_squared_clt.php" />
+	<code file="plot_chi_squared_clt.js" />
 	<help file="plot_chi_squared_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,77 +1,55 @@
-/* ------- 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 nAvg;
 var nDist;
-var undefined;
 
-
-
 function printout () {
 	doPrintout (true);
 }
 
 function preview () {
-	preprocess ();
-	calculate ();
+	do_preprocess ();
+	do_calculate ();
 	doPrintout (false);
 }
 
 function doPrintout (full) {
-	var fun = "";
-	var scalenorm = "";
-	var drawnorm = "";
-	var normMuSigma_tag = "";
-	var plotpre = "";
-	var plotoptions = "";
-	var plotadds = "";
-	var normFun = "";
-	var histcalcoptions = "";
-	var histplotoptions = "";
-	var yLim = "";
-	fun = getValue ("function");
+	var fun = getValue ("function");
 	nAvg = getValue ("nAvg"); // number of observations to calculate the averages
 	nDist = getValue ("nDist"); // number of sample to construct the distribution
 
-	scalenorm = getValue ("scalenorm"); // if variables should to normalised..
-	drawnorm = getValue ("drawnorm");
+	var scalenorm = getValue ("scalenorm"); // if variables should to normalised..
+	var drawnorm = getValue ("drawnorm");
 
 
 	echo ('# parameters:\n');
 	doParameters (); // get the parameters from xml file and store them R varaibles
 
 	if (scalenorm || drawnorm) {
-
 		echo ('# mean and variances of the distribution of sample averages:\n');
 		doExpVar (); // calculate the expectation and varaince of the distribution of smaple averages
 	}
 
 	// Mean and Std.deviantion of Normal distribution:
-	if (scalenorm) normMuSigma_tag = ""; // defaults to mean=0, sd=1.
-	else normMuSigma_tag = ", mean = avg.exp, sd = sqrt(avg.var)";
+	var normMuSigma_tag = ""; // defaults to mean=0, sd=1.
+	if (!scalenorm) normMuSigma_tag = ", mean = avg.exp, sd = sqrt(avg.var)";
 
-	plotpre = getValue ("plotoptions.code.preprocess");
-	plotoptions = getValue ("plotoptions.code.printout");
-	plotadds = getValue ("plotoptions.code.calculate");
+	var plotpre = getValue ("plotoptions.code.preprocess");
+	var plotoptions = getValue ("plotoptions.code.printout");
+	var plotadds = getValue ("plotoptions.code.calculate");
+	var normFun = "";
+	var histcalcoptions = "";
+	var histplotoptions = "";
 	if (fun == "hist") {
 		normFun = "dnorm"; // draw normal density on the histogram
 		histcalcoptions = getValue ("histogram_opt.code.calculate"); // options that goes into hist() function
 		histplotoptions = getValue ("histogram_opt.code.printout"); // options that goes into plot.histogram()
 		histplotoptions += plotoptions; // generic plot options
-	}
-	elseif (fun == "dist") {
+	} else if (fun == "dist") {
 		normFun = "pnorm"; // draw normal cdf on the ecdf plot
 		plotoptions += getValue ("dist_stepfun.code.printout"); // plot.ecdf() and plot.stepfun() options
 	}
 
-	yLim = ""; // initialise the ylim option
+	var yLim = ""; // initialise the ylim option
 
 
 	echo ('# generate the entire data:\n');
@@ -80,48 +58,42 @@
 
 	echo ('# get the sample averages:\n');
 	echo ('avg <- colMeans(data);\n');
-	if (scalenorm) {
 
+	if (scalenorm) {
 		echo ('# normalise the variables:\n');
 		echo ('avg <- (avg - avg.exp)/sqrt(avg.var);\n');
 	}
 	if (drawnorm) {
-
 		echo ('# generate random normal samples:\n');
 		echo ('normX <- seq(from=min(avg), to=max(avg), length=' + nDist + ');\n');
 		echo ('normY <- ' + normFun + ' (normX' + normMuSigma_tag + ');\n');
 	}
 	if (fun == "hist") {
-
 		echo ('dist.hist <- hist(avg, plot=FALSE' + histcalcoptions + ');\n');
 		if (drawnorm) {
-
 			echo ('# calculate the ylims appropriately:\n');
 			echo ('ylim <- c(0,max(c(dist.hist$density, normY)));\n');
 			yLim = ', ylim=ylim';
 		}
 	}
-	if (full) {
 
+	if (full) {
 		echo ('rk.graph.on ()\n');
 		echo ('try ({\n');
 	}
-	if (!empty (plotpre)) printIndented ("\t", plotpre);
-	if (fun == "hist") {
 
+	if (plotpre.length > 0) printIndented ("\t", plotpre);
+	if (fun == "hist") {
 		echo ('	plot(dist.hist' + yLim + histplotoptions + ')\n');
-	}
-	elseif (fun == "dist") {
-
+	} else if (fun == "dist") {
 		echo ('	plot(ecdf(avg)' + plotoptions + ')\n');
 	}
 	if (drawnorm) {
-
 		echo ('	lines (x=normX, y=normY, type="' + getValue ("normpointtype") + '"' + getValue ("normlinecol.code.printout") + ')\n');
 	}
-	if (!empty (plotadds)) printIndented ("\t", plotadds);
-	if (full) {
+	if (plotadds.length > 0) printIndented ("\t", plotadds);
 
+	if (full) {
 		echo ('})\n');
 		echo ('rk.graph.off ()\n');
 	}

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_clt_common.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,123 +0,0 @@
-<?php
-function preprocess () {
-}
-
-function calculate () {
-}
-
-function printout () {
-	doPrintout (true);
-}
-
-function preview () {
-	preprocess ();
-	calculate ();
-	doPrintout (false);
-}
-
-function doPrintout ($final) {
-	global $nAvg;
-	global $nDist;
-
-	$fun = getRK_val ("function");
-	$nAvg = getRK_val ("nAvg"); // number of observations to calculate the averages
-	$nDist = getRK_val ("nDist"); // number of sample to construct the distribution
-
-	$scalenorm = getRK_val ("scalenorm"); // if variables should to normalised..
-	$drawnorm = getRK_val ("drawnorm");
-
-?>
-# parameters:
-<?
-	doParameters (); // get the parameters from xml file and store them R varaibles
-
-	if ($scalenorm || $drawnorm) {
-?>
-# mean and variances of the distribution of sample averages:
-<?
-		doExpVar (); // calculate the expectation and varaince of the distribution of smaple averages
-	}
-
-	// Mean and Std.deviantion of Normal distribution:
-	if ($scalenorm) $normMuSigma_tag = ""; // defaults to mean=0, sd=1.
-	else $normMuSigma_tag = ", mean = avg.exp, sd = sqrt(avg.var)";
-
-	$plotpre = getRK_val ("plotoptions.code.preprocess");
-	$plotoptions = getRK_val ("plotoptions.code.printout");
-	$plotadds = getRK_val ("plotoptions.code.calculate");
-	if ($fun == "hist") {
-		$normFun = "dnorm"; // draw normal density on the histogram
-		$histcalcoptions = getRK_val ("histogram_opt.code.calculate"); // options that goes into hist() function
-		$histplotoptions = getRK_val ("histogram_opt.code.printout"); // options that goes into plot.histogram()
-		$histplotoptions .= $plotoptions; // generic plot options
-	} elseif ($fun == "dist") {
-		$normFun = "pnorm"; // draw normal cdf on the ecdf plot
-		$plotoptions .= getRK_val ("dist_stepfun.code.printout"); // plot.ecdf() and plot.stepfun() options
-	}
-
-	$yLim = ""; // initialise the ylim option
-
-?>
-# generate the entire data:
-<?
-	doGenerateData (); // generate the random samples
-
-?>
-# get the sample averages:
-avg <- colMeans(data);
-<?
-	if ($scalenorm) {
-?>
-# normalise the variables:
-avg <- (avg - avg.exp)/sqrt(avg.var);
-<?
-	}
-	if ($drawnorm) {
-?>
-# generate random normal samples:
-normX <- seq(from=min(avg), to=max(avg), length=<? echo ($nDist); ?>);
-normY <- <? echo ($normFun); ?> (normX<? echo ($normMuSigma_tag); ?>);
-<?
-	}
-	if ($fun == "hist") {
-?>
-dist.hist <- hist(avg, plot=FALSE<? echo ($histcalcoptions); ?>);
-<?
-		if ($drawnorm) {
-?>
-# calculate the ylims appropriately:
-ylim <- c(0,max(c(dist.hist$density, normY)));
-<?
-			$yLim = ', ylim=ylim';
-		}
-	}
-	if ($final) {
-?>
-rk.graph.on ()
-try ({
-<?
-	}
-	if (!empty ($plotpre)) printIndented ("\t", $plotpre);
-	if ($fun == "hist") {
-?>
-	plot(dist.hist<? echo ($yLim); echo ($histplotoptions); ?>)
-<?
-	} elseif ($fun == "dist") {
-?>
-	plot(ecdf(avg)<? echo ($plotoptions); ?>)
-<?
-	}
-	if ($drawnorm) {
-?>
-	lines (x=normX, y=normY, type="<? getRK ("normpointtype"); ?>"<? getRK ("normlinecol.code.printout"); ?>)
-<?
-	}
-	if (!empty ($plotadds)) printIndented ("\t", $plotadds);
-	if ($final) {
-?>
-})
-rk.graph.off ()
-<?
-	}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-rate <- <? echo(getRK_val ("rate")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- 1/rate;
-avg.var <- (1/(rate^2))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rexp(n=<? echo ($nAvg*$nDist); ?>, rate=rate), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_exponential_clt.php" />
+	<code file="plot_exponential_clt.js" />
 	<help file="plot_exponential_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 
@@ -17,11 +10,9 @@
 
 function doExpVar () {
 	if (getValue ("ncp") == 0) {
-
 		echo ('avg.exp <- df2*df1/(df1*(df2-2));\n');
 		echo ('avg.var <- (2*df2^2*(df1+df2-2)/(df1*(df2-2)^2*(df2-4)))/' + nAvg + ';\n');
 	} else {
-
 		echo ('avg.exp <- df2*(df1+ncp)/(df1*(df2-2));\n');
 		echo ('avg.var <- (2*df2^2*((df1+ncp)^2  + (df1+2*ncp)*(df2-2)) / (df1^2*(df2-2)^2*(df2-4)))/' + nAvg + ';\n');
 	}

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,33 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-df1 <- <? echo(getRK_val ("df1")); ?>; df2 <- <? echo(getRK_val ("df2")); ?>; ncp <- <? echo(getRK_val ("ncp")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-
-	if (getRK_val ("ncp") == 0) {
-?>
-avg.exp <- df2*df1/(df1*(df2-2));
-avg.var <- (2*df2^2*(df1+df2-2)/(df1*(df2-2)^2*(df2-4)))/<? echo($nAvg); ?>;
-<?
-	} else {
-?>
-avg.exp <- df2*(df1+ncp)/(df1*(df2-2));
-avg.var <- (2*df2^2*((df1+ncp)^2  + (df1+2*ncp)*(df2-2)) / (df1^2*(df2-2)^2*(df2-4)))/<? echo($nAvg); ?>;
-<?
-	}
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rf(n=<? echo ($nAvg*$nDist); ?>, df1=df1, df2=df2, ncp=ncp), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_f_clt.php" />
+	<code file="plot_f_clt.js" />
 	<help file="plot_f_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-shape <- <? echo(getRK_val ("shape")); ?>; rate <- <? echo(getRK_val ("rate")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- shape/rate;
-avg.var <- (shape/(rate^2))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rgamma(n=<? echo ($nAvg*$nDist); ?>, shape=shape, rate=rate), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_gamma_clt.php" />
+	<code file="plot_gamma_clt.js" />
 	<help file="plot_gamma_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-prob <- <? echo(getRK_val ("prob")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- (1-prob)/prob;
-avg.var <- ((1-prob)/(prob^2))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rgeom(n=<? echo ($nAvg*$nDist); ?>, prob=prob), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_geometric_clt.php" />
+	<code file="plot_geometric_clt.js" />
 	<help file="plot_geometric_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-m <- <? echo(getRK_val ("m")); ?>; n <- <? echo(getRK_val ("n")); ?>; k <- <? echo(getRK_val ("k")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- k*m/(m+n);
-avg.var <- (k*m*n*(m+n-k)/((m+n)^2*(m+n-1)))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rhyper(nn=<? echo ($nAvg*$nDist); ?>, m=m, n=n, k=k), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_hypergeometric_clt.php" />
+	<code file="plot_hypergeometric_clt.js" />
 	<help file="plot_hypergeometric_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-loc <- <? echo(getRK_val ("loc")); ?>; scale <- <? echo(getRK_val ("scale")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- loc;
-avg.var <- ((pi^2/3)*scale^2)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rlogis(n=<? echo ($nAvg*$nDist); ?>, location=loc, scale=scale), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_logistic_clt.php" />
+	<code file="plot_logistic_clt.js" />
 	<help file="plot_logistic_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-mean <- <? echo(getRK_val ("mean")); ?>; sd <- <? echo(getRK_val ("sd")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- exp(mean+sd^2/2);
-avg.var <- (exp(2*mean+sd^2)*(exp(sd^2)-1))/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rlnorm(n=<? echo ($nAvg*$nDist); ?>, meanlog=mean, sdlog=sd), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_lognormal_clt.php" />
+	<code file="plot_lognormal_clt.js" />
 	<help file="plot_lognormal_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +1,16 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var paramTag;
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 
 function doParameters () {
 	if ( getValue ("param") == "pprob") {
 		paramTag = ", prob=prob";
-
 		echo ('size <- ' + getValue ("size_trial") + '; prob <- ' + getValue ("prob") + ';\n');
 	} else {
 		paramTag = ", mu=mu";
-
 		echo ('size <- ' + getValue ("size_disp") + '; mu <- ' + getValue ("mu") + '; prob <- size/(size+mu);\n');
 	}
 }

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,35 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-	global $paramTag;
- 	if ( getRK_val ("param") == "pprob") {
-		$paramTag = ", prob=prob";
-?>
-size <- <? echo(getRK_val ("size_trial")); ?>; prob <- <? echo(getRK_val ("prob")); ?>;
-<?
-	} else {
-		$paramTag = ", mu=mu";
-?>
-size <- <? echo(getRK_val ("size_disp")); ?>; mu <- <? echo(getRK_val ("mu")); ?>; prob <- size/(size+mu);
-<?
-	}
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- size*(1-prob)/prob;
-avg.var <- (size*(1-prob)/prob^2)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $paramTag;
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rnbinom(n=<? echo ($nAvg*$nDist); ?>, size=size<? echo ($paramTag); ?>), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_negbinomial_clt.php" />
+	<code file="plot_negbinomial_clt.js" />
 	<help file="plot_negbinomial_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-mean <- <? echo(getRK_val ("mean")); ?>; sd <- <? echo(getRK_val ("sd")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- mean;
-avg.var <- (sd^2)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rnorm(n=<? echo ($nAvg*$nDist); ?>, mean=mean, sd=sd), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_normal_clt.php" />
+	<code file="plot_normal_clt.js" />
 	<help file="plot_normal_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-mean <- <? echo(getRK_val ("mean")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- mean;
-avg.var <- (mean)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rpois(n=<? echo ($nAvg*$nDist); ?>, lambda=mean), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_poisson_clt.php" />
+	<code file="plot_poisson_clt.js" />
 	<help file="plot_poisson_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 
@@ -17,11 +10,9 @@
 
 function doExpVar () {
 	if (getValue ("ncp") == 0) {
-
 		echo ('avg.exp <- 0;\n');
 		echo ('avg.var <- df/((df-2)*' + nAvg + ');\n');
 	} else {
-
 		echo ('tmp.var <- gamma((df-1)/2)/gamma(df/2);\n');
 		echo ('avg.exp <- ncp*sqrt(df/2)*tmp.var;\n');
 		echo ('avg.var <- (df*(1+ncp^2)/(df-2) - ncp^2*df*tmp.var^2/2)/' + nAvg + ';\n');

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,34 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-df <- <? echo(getRK_val ("df")); ?>; ncp <- <? getRK ("ncp"); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-
-	if (getRK_val ("ncp") == 0) {
-?>
-avg.exp <- 0;
-avg.var <- df/((df-2)*<? echo($nAvg); ?>);
-<?
-	} else {
-?>
-tmp.var <- gamma((df-1)/2)/gamma(df/2);
-avg.exp <- ncp*sqrt(df/2)*tmp.var;
-avg.var <- (df*(1+ncp^2)/(df-2) - ncp^2*df*tmp.var^2/2)/<? echo($nAvg); ?>;
-<?
-	}
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rt(n=<? echo ($nAvg*$nDist); ?>, df=df, ncp=ncp), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_t_clt.php" />
+	<code file="plot_t_clt.js" />
 	<help file="plot_t_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-llim <- <? echo(getRK_val ("llim")); ?>; ulim <- <? getRK ("ulim"); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- (llim+ulim)/2;
-avg.var <- ((ulim-llim)^2/12)/<? echo($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(runif(n=<? echo ($nAvg*$nDist); ?>, min=llim, max=ulim), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_uniform_clt.php" />
+	<code file="plot_uniform_clt.js" />
 	<help file="plot_uniform_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-scale <- <? echo(getRK_val ("scale")); ?>; shape <- <? echo(getRK_val ("shape")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- scale*gamma(1+1/shape);
-avg.var <- (scale^2*gamma(1+2/shape) - avg.exp^2)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rweibull(n=<? echo ($nAvg*$nDist); ?>, shape=shape, scale=scale), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_weibull_clt.php" />
+	<code file="plot_weibull_clt.js" />
 	<help file="plot_weibull_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,13 +1,6 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
 // globals
 var nAvg;
 var nDist;
-var undefined;
 
 include ('plot_clt_common.js');
 

Deleted: trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,25 +0,0 @@
-<?php
-include ("plot_clt_common.php");
-
-function doParameters () {
-?>
-m <- <? echo(getRK_val ("nm")); ?>; n <- <? echo(getRK_val ("nn")); ?>;
-<?
-}
-
-function doExpVar () {
-	global $nAvg;
-?>
-avg.exp <- m*n/2;
-avg.var <- (m*n*(m+n+1)/12)/<? echo ($nAvg); ?>;
-<?
-}
-
-function doGenerateData () {
-	global $nAvg;
-	global $nDist;
-?>
-data <- matrix(rwilcox(nn=<? echo ($nAvg*$nDist); ?>, m=m, n=n), nrow=<? echo ($nAvg); ?>);
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-	<code file="plot_wilcoxon_clt.php" />
+	<code file="plot_wilcoxon_clt.js" />
 	<help file="plot_wilcoxon_clt.rkh" />
 	<snippets>
 		<snippet id="dist_options">

Modified: trunk/rkward/rkward/plugins/simple_anova/code.js
===================================================================
--- trunk/rkward/rkward/plugins/simple_anova/code.js	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/simple_anova/code.js	2010-03-03 20:55:33 UTC (rev 2759)
@@ -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 ('model = glm (' + getValue ("model") + ', data=' + getValue ("model.table") + ')\n');
 	echo ('labels = ' + getValue ("model.labels") + ' \n');

Deleted: trunk/rkward/rkward/plugins/simple_anova/code.php
===================================================================
--- trunk/rkward/rkward/plugins/simple_anova/code.php	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/simple_anova/code.php	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,18 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-?>model = glm (<? getRK ("model"); ?>, data=<? getRK ("model.table"); ?>)
-labels = <? getRK ("model.labels"); ?> 
-result = anova (model)
-<?
-}
-
-function printout () {
-?>
-rk.header ("Simple Anova")
-rk.print (result)
-<?
-}
-?>

Modified: trunk/rkward/rkward/plugins/simple_anova/description.xml
===================================================================
--- trunk/rkward/rkward/plugins/simple_anova/description.xml	2010-03-03 12:20:37 UTC (rev 2758)
+++ trunk/rkward/rkward/plugins/simple_anova/description.xml	2010-03-03 20:55:33 UTC (rev 2759)
@@ -1,7 +1,7 @@
 <!DOCTYPE rkplugin>
 
 <document>
-	<code file="code.php"/>
+	<code file="code.js"/>
 	
 	<dialog label="Simple Anova">
 		<text>


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