[rkward-cvs] SF.net SVN: rkward:[2758] trunk/rkward/rkward/plugins/distributions
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Mar 3 12:20:41 UTC 2010
Revision: 2758
http://rkward.svn.sourceforge.net/rkward/?rev=2758&view=rev
Author: tfry
Date: 2010-03-03 12:20:37 +0000 (Wed, 03 Mar 2010)
Log Message:
-----------
Another bunch of plugins converted to JS
Modified Paths:
--------------
trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.js
trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.xml
trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.js
trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.xml
trunk/rkward/rkward/plugins/distributions/logistic_probabilities.js
trunk/rkward/rkward/plugins/distributions/logistic_probabilities.xml
trunk/rkward/rkward/plugins/distributions/logistic_quantiles.js
trunk/rkward/rkward/plugins/distributions/logistic_quantiles.xml
trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.js
trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.xml
trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.js
trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.xml
trunk/rkward/rkward/plugins/distributions/normal_probabilities.js
trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml
trunk/rkward/rkward/plugins/distributions/normal_quantiles.js
trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml
trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_dist_common.js
trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_f_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_t_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml
trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.js
trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml
trunk/rkward/rkward/plugins/distributions/poisson_probabilities.js
trunk/rkward/rkward/plugins/distributions/poisson_probabilities.xml
trunk/rkward/rkward/plugins/distributions/poisson_quantiles.js
trunk/rkward/rkward/plugins/distributions/poisson_quantiles.xml
trunk/rkward/rkward/plugins/distributions/t_probabilities.js
trunk/rkward/rkward/plugins/distributions/t_probabilities.xml
trunk/rkward/rkward/plugins/distributions/t_quantiles.js
trunk/rkward/rkward/plugins/distributions/t_quantiles.xml
trunk/rkward/rkward/plugins/distributions/tests/ad_test.js
trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml
trunk/rkward/rkward/plugins/distributions/tests/cvm_test.js
trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml
trunk/rkward/rkward/plugins/distributions/tests/jb_test.js
trunk/rkward/rkward/plugins/distributions/tests/jb_test.xml
trunk/rkward/rkward/plugins/distributions/tests/lillie_test.js
trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml
trunk/rkward/rkward/plugins/distributions/tests/pearson_test.js
trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml
trunk/rkward/rkward/plugins/distributions/tests/sf_test.js
trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml
trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.js
trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml
trunk/rkward/rkward/plugins/distributions/tukey_probabilities.js
trunk/rkward/rkward/plugins/distributions/tukey_probabilities.xml
trunk/rkward/rkward/plugins/distributions/tukey_quantiles.js
trunk/rkward/rkward/plugins/distributions/tukey_quantiles.xml
trunk/rkward/rkward/plugins/distributions/uniform_probabilities.js
trunk/rkward/rkward/plugins/distributions/uniform_probabilities.xml
trunk/rkward/rkward/plugins/distributions/uniform_quantiles.js
trunk/rkward/rkward/plugins/distributions/uniform_quantiles.xml
trunk/rkward/rkward/plugins/distributions/weibull_probabilities.js
trunk/rkward/rkward/plugins/distributions/weibull_probabilities.xml
trunk/rkward/rkward/plugins/distributions/weibull_quantiles.js
trunk/rkward/rkward/plugins/distributions/weibull_quantiles.xml
trunk/rkward/rkward/plugins/distributions/wilcoxon_probabilities.js
trunk/rkward/rkward/plugins/distributions/wilcoxon_probabilities.xml
trunk/rkward/rkward/plugins/distributions/wilcoxon_quantiles.js
trunk/rkward/rkward/plugins/distributions/wilcoxon_quantiles.xml
Removed Paths:
-------------
trunk/rkward/rkward/plugins/distributions/beta_probabilities.php
trunk/rkward/rkward/plugins/distributions/beta_quantiles.php
trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php
trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php
trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.php
trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.php
trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php
trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php
trunk/rkward/rkward/plugins/distributions/exponential_probabilities.php
trunk/rkward/rkward/plugins/distributions/exponential_quantiles.php
trunk/rkward/rkward/plugins/distributions/f_probabilities.php
trunk/rkward/rkward/plugins/distributions/f_quantiles.php
trunk/rkward/rkward/plugins/distributions/gamma_probabilities.php
trunk/rkward/rkward/plugins/distributions/gamma_quantiles.php
trunk/rkward/rkward/plugins/distributions/geom_probabilities.php
trunk/rkward/rkward/plugins/distributions/geom_quantiles.php
trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.php
trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.php
trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.php
trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.php
trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.php
trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.php
trunk/rkward/rkward/plugins/distributions/logistic_probabilities.php
trunk/rkward/rkward/plugins/distributions/logistic_quantiles.php
trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.php
trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.php
trunk/rkward/rkward/plugins/distributions/normal_probabilities.php
trunk/rkward/rkward/plugins/distributions/normal_quantiles.php
trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_dist_common.php
trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php
trunk/rkward/rkward/plugins/distributions/poisson_probabilities.php
trunk/rkward/rkward/plugins/distributions/poisson_quantiles.php
trunk/rkward/rkward/plugins/distributions/t_probabilities.php
trunk/rkward/rkward/plugins/distributions/t_quantiles.php
trunk/rkward/rkward/plugins/distributions/tests/ad_test.php
trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php
trunk/rkward/rkward/plugins/distributions/tests/jb_test.php
trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php
trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php
trunk/rkward/rkward/plugins/distributions/tests/sf_test.php
trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php
trunk/rkward/rkward/plugins/distributions/tukey_probabilities.php
trunk/rkward/rkward/plugins/distributions/tukey_quantiles.php
trunk/rkward/rkward/plugins/distributions/uniform_probabilities.php
trunk/rkward/rkward/plugins/distributions/uniform_quantiles.php
trunk/rkward/rkward/plugins/distributions/weibull_probabilities.php
trunk/rkward/rkward/plugins/distributions/weibull_quantiles.php
trunk/rkward/rkward/plugins/distributions/wilcoxon_probabilities.php
trunk/rkward/rkward/plugins/distributions/wilcoxon_quantiles.php
Deleted: trunk/rkward/rkward/plugins/distributions/beta_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/beta_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pbeta (q = <? echo ($q); ?>, shape1 = <? getRK ("shape1"); ?>, shape2 = <? getRK ("shape2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Beta probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Shape 1", "<? getRK ("shape1"); ?>", "Shape 2", "<? getRK ("shape2"); ?>", "non-centrality parameter (ncp)", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Beta probability")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/beta_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/beta_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,21 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-
-?>
-result <- (qbeta (p = <? echo ($p); ?>, shape1 = <? getRK ("shape1"); ?>, shape2 = <? getRK ("shape2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Beta quantiles", list ("Vector of probabilities", "<? echo ($p); ?>", "Shape 1", "<? getRK ("shape1"); ?>", "Shape 2", "<? getRK ("shape2"); ?>", "non-centrality parameter (ncp)", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Beta quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,21 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qbinom (p = <? echo ($p); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- //produce the output
- global $p;
-?>
-rk.header ("Binomial quantile", list ("Vector of quantiles probabilities", "<? echo ($p); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Binomial quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pbinom (q = <? echo ($q); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Binomial tail probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Binomial tail probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pcauchy (q = <? echo ($q); ?>, location = <? getRK ("location"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Cauchy probabilities", list ("Vector of quantiles", "<? echo ($q); ?>", "Location", "<? getRK ("location"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Cauchy probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/cauchy_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qcauchy (p = <? echo ($p); ?>, location = <? getRK ("location"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Cauchy quantiles", list ("Vector of probabilities", "<? echo ($p); ?>", "Location", "<? getRK ("location"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Cauchy quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pchisq (q = <? echo ($q); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Chi-squared probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Degrees of Freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Chi-squared probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qchisq (p = <? echo ($p); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Chi-squared quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Chi-squared quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/exponential_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/exponential_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,21 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-
-?>
-result <- (pexp (q = <? echo ($q); ?>, rate = <? getRK ("rate"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Exponential probabilities", list ("Vector of quantiles", "<? echo ($q); ?>", "Rate", "<? getRK ("rate"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Exponential probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/exponential_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/exponential_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/exponential_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qexp (p = <? echo ($p); ?>, rate = <? getRK ("rate"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Exponential quantiles", list ("Vector of probabilities", "<? echo ($p); ?>", "Rate", "<? getRK ("rate"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Exponential quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/f_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/f_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pf (q = <? echo ($q); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("F probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="F probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/f_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/f_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qf (p = <? echo ($p); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("F quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="F quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/gamma_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/gamma_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pgamma (q = <? echo ($q); ?>, shape = <? getRK ("shape"); ?>, rate = <? getRK ("rate"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Gamma probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Shape", "<? getRK ("shape"); ?>", "Rate", "<? getRK ("rate"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Gamma probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/gamma_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gamma_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/gamma_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,21 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qgamma (p = <? echo ($p); ?>, shape = <? getRK ("shape"); ?>, rate = <? getRK ("rate"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Gamma quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Shape", "<? getRK ("shape"); ?>", "Rate", "<? getRK ("rate"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Gamma quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/geom_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/geom_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pgeom (q = <? echo ($q); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Geometric probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Probability of success in each trial", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Geometric probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/geom_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/geom_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/geom_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qgeom (p = <? echo ($p); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Geometric quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Probability of success in each trial", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Geometric quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/gumbel_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pweibull (q = exp(<? echo ($q); ?>), shape = <? getRK ("shape"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Gumbel probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Shape", "<? getRK ("shape"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Gumbel probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/gumbel_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- log(qweibull (p = <? echo ($p); ?>, shape = <? getRK ("shape"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Gumbel quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Shape", "<? getRK ("shape"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Gumbel quantiles")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/hypergeometric_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (phyper (q = <? echo ($q); ?>, m = <? getRK ("m"); ?>, n = <? getRK ("n"); ?>, k = <? getRK ("k"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Hypergeometric probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Number of white balls in the urn", "<? getRK ("m"); ?>", "Number of black balls in the urn", "<? getRK ("n"); ?>", "Number of balls drawn from the urn", "<? getRK ("k"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Hypergeometric probabilities")
-<?
-}
-?>
Deleted: trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/hypergeometric_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qhyper (p = <? echo ($p); ?>, m = <? getRK ("m"); ?>, n = <? getRK ("n"); ?>, k = <? getRK ("k"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Hypergeometric quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Number of white balls in the urn", "<? getRK ("m"); ?>", "Number of black balls in the urn", "<? getRK ("n"); ?>", "Number of balls drawn from the urn", "<? getRK ("k"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Hypergeometric quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (plnorm (q = ' + q + ', meanlog = ' + getValue ("meanlog") + ', sdlog = ' + getValue ("sdlog") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (plnorm (q = <? echo ($q); ?>, meanlog = <? getRK ("meanlog"); ?>, sdlog = <? getRK ("sdlog"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Log Normal probability", list ("Vector of quantiles", "<? echo ($q); ?>", "meanlog", "<? getRK ("meanlog"); ?>", "sdlog", "<? getRK ("sdlog"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Log Normal probabilities")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_probabilities.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="log_normal_probabilities.php" />
+ <code file="log_normal_probabilities.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="0" id="meanlog" label="meanlog (mean of the distribution on the log scale)"/>
Modified: trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (qlnorm (p = ' + p + ', meanlog = ' + getValue ("meanlog") + ', sdlog = ' + getValue ("sdlog") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qlnorm (p = <? echo ($p); ?>, meanlog = <? getRK ("meanlog"); ?>, sdlog = <? getRK ("sdlog"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Log Normal quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "meanlog", "<? getRK ("meanlog"); ?>", "sdlog", "<? getRK ("sdlog"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Log Normal quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/log_normal_quantiles.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="log_normal_quantiles.php" />
+ <code file="log_normal_quantiles.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="0" id="meanlog" label="meanlog (mean of the distribution on the log scale)"/>
Modified: trunk/rkward/rkward/plugins/distributions/logistic_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_probabilities.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_probabilities.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (plogis (q = ' + q + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/logistic_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (plogis (q = <? echo ($q); ?>, location = <? getRK ("location"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Logistic probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Location", "<? getRK ("location"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Logistic probabilities")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/logistic_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_probabilities.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_probabilities.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="logistic_probabilities.php" />
+ <code file="logistic_probabilities.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="1" id="location" label="Location"/>
Modified: trunk/rkward/rkward/plugins/distributions/logistic_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_quantiles.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_quantiles.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (qlogis (p = ' + p + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/logistic_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qlogis (p = <? echo ($p); ?>, location = <? getRK ("location"); ?>, scale = <? getRK ("scale"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Logistic quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Location", "<? getRK ("location"); ?>", "Scale", "<? getRK ("scale"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Logistic quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/logistic_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/logistic_quantiles.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/logistic_quantiles.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="logistic_quantiles.php" />
+ <code file="logistic_quantiles.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="1" id="location" label="Location"/>
Modified: trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (pnbinom (q = ' + q + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,21 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-
-?>
-result <- (pnbinom (q = <? echo ($q); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Negative Binomial probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Size", "<? getRK ("size"); ?>", "Probability of success in each trial", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Negative Binomial probabilities")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_probabilities.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="negative_binomial_probabilities.php" />
+ <code file="negative_binomial_probabilities.js" />
<snippets>
<snippet id="dist_options">
<spinbox type="integer" min="0" initial="1" id="size" label="Target for number of successful trials"/>
Modified: trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (qnbinom (p = ' + p + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qnbinom (p = <? echo ($p); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Negative Binomial quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Size", "<? getRK ("size"); ?>", "Probability of success in each trial", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Negative Binomial quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/negative_binomial_quantiles.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="negative_binomial_quantiles.php" />
+ <code file="negative_binomial_quantiles.js" />
<snippets>
<snippet id="dist_options">
<spinbox type="integer" min="0" initial="1" id="size" label="Target for number of successful trials"/>
Modified: trunk/rkward/rkward/plugins/distributions/normal_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_probabilities.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_probabilities.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (pnorm (q = ' + q + ', mean = ' + getValue ("mean") + ', sd = ' + getValue ("sd") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/normal_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (pnorm (q = <? echo ($q); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Normal probability", list ("Vector of quantiles", "<? echo ($q); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Normal probabilities")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="normal_probabilities.php" />
+ <code file="normal_probabilities.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="0" id="mean" label="mu (mean)"/>
Modified: trunk/rkward/rkward/plugins/distributions/normal_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_quantiles.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_quantiles.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (qnorm (p = ' + p + ', mean = ' + getValue ("mean") + ', sd = ' + getValue ("sd") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/normal_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qnorm (p = <? echo ($p); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>, <? getRK ("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Normal quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"));
-rk.results (result, titles="Normal quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="normal_quantiles.php" />
+ <code file="normal_quantiles.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" initial="0" id="mean" label="mu (mean)" />
Modified: trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,30 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['a'] = getRK_val ("a");
- $options['b'] = getRK_val ("b");
- $options['ncp'] = getRK_val ("ncp");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dbeta";
- } else {
- $options['fun'] = "pbeta";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Beta ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Shape1", "' . $options['a'] . '", "Shape2", "' . $options['b'] . '", "Non-centrality parameter", "' . $options['ncp'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, shape1=' . $options['a'] . ', shape2=' . $options['b'] . ', ncp=' . $options['ncp'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_beta_distribution.php" />
+ <code file="plot_beta_distribution.js" />
<help file="plot_beta_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['size'] = getRK_val ("size");
- $options['prob'] = getRK_val ("prob");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dbinom";
- } else {
- $options['fun'] = "pbinom";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Binomial ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Number of trials", "' . $options['size'] . '", "Probability of success on each trial", "' . $options['prob'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, size=' . $options['size'] . ', prob=' . $options['prob'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_binomial_distribution.php" />
+ <code file="plot_binomial_distribution.js" />
<help file="plot_binomial_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['loc'] = getRK_val ("loc");
- $options['scale'] = getRK_val ("scale");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dcauchy";
- } else {
- $options['fun'] = "pcauchy";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Cauchy ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Location", "' . $options['loc'] . '", "Scale", "' . $options['scale'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, location=' . $options['loc'] . ', scale=' . $options['scale'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_cauchy_distribution.php" />
+ <code file="plot_cauchy_distribution.js" />
<help file="plot_cauchy_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['df'] = getRK_val ("df");
- $options['ncp'] = getRK_val ("ncp");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dchisq";
- } else {
- $options['fun'] = "pchisq";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Chisquare ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Degrees of freedom", "' . $options['df'] . '", "Non-centrality parameter", "' . $options['ncp'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, df=' . $options['df'] . ', ncp=' . $options['ncp'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
-<!--This is the simple "Plot Chi-squared probabilities" plugin--><document>
- <code file="plot_chi_squared_distribution.php" />
+<document>
+ <code file="plot_chi_squared_distribution.js" />
<help file="plot_chi_squared_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_dist_common.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_dist_common.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_dist_common.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,25 +1,13 @@
-/* ------- 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 options;
-var undefined;
-
-
function printout () {
doPrintout (true);
}
function preview () {
- preprocess ();
- calculate ();
+ do_preprocess (); // do_preprocess calls preprocess(), if, and only if that is defined
+ do_calculate ();
doPrintout (false);
}
@@ -38,24 +26,21 @@
}
function doPrintout (full) {
- var fun = "";
- var log = "";
- var log_option = "";
+ var plot_adds = "";
+ var fun = getValue ("function");
+ var _log = (getValue ("log") == 1);
+
var is_density = "";
var label = "";
var tail_option = "";
var tail_label = "";
- var log_label = "";
- var plot_adds = "";
- fun = getValue ("function");
- log = (getValue ("log") == 1);
- log_option = "";
+ var log_option = "";
if (fun == "d") {
is_density = true;
label = "density";
tail_option = "";
tail_label = "";
- if (log) log_option = ", log=TRUE";
+ if (_log) log_option = ", log=TRUE";
} else {
is_density = false;
label = "distribution";
@@ -66,11 +51,12 @@
tail_option = ", lower.tail = FALSE";
tail_label = ", \"Tail\",\"Upper\"";
}
- if (log) log_option = ", log.p=TRUE";
+ if (_log) log_option = ", log.p=TRUE";
}
- if (log) log_label = ', "Scale", "logarithmic"';
- else log_label = ', "Scale", "normal"';
+ var log_label = ', "Scale", "normal"';
+ if (_log) log_label = ', "Scale", "logarithmic"';
+
options = new Array();
options['is_density'] = is_density;
options['label'] = label;
@@ -93,7 +79,7 @@
echo (', from=' + options['min'] + ', to=' + options['max'] + ', n=' + options['n'] + getValue ("plotoptions.code.printout") + ')\n');
plot_adds = getValue ("plotoptions.code.calculate");
- if (!empty (plot_adds)) {
+ if (plot_adds.length > 0) {
echo ('\n');
printIndented ("\t", plot_adds);
}
Deleted: trunk/rkward/rkward/plugins/distributions/plot_dist_common.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_dist_common.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_dist_common.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,93 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-}
-
-function printout () {
- doPrintout (true);
-}
-
-function preview () {
- preprocess ();
- calculate ();
- doPrintout (false);
-}
-
-// get the range parameters for the continuous distributions (it's all the same for these)
-function getContRangeParameters () {
- global $options;
-
- $options['n'] = getRK_val ("n");
- $options['min'] = getRK_val ("min");
- $options['max'] = getRK_val ("max");
-}
-
-// get the range parameters for the discontinuous distributions (it's all the same for these)
-function getDiscontRangeParameters () {
- global $options;
-
- $options['min'] = getRK_val ("min");
- $options['max'] = getRK_val ("max");
- $options['n'] = $options['max'] - $options['min'] + 1;
-}
-
-function doPrintout ($final) {
- global $options;
-
- $fun = getRK_val ("function");
- $log = (getRK_val ("log") == 1);
- $log_option = "";
- if ($fun == "d") {
- $is_density = true;
- $label = "density";
- $tail_option = "";
- $tail_label = "";
- if ($log) $log_option = ", log=TRUE";
- } else {
- $is_density = false;
- $label = "distribution";
- if (getRK_val("lower") == "1") {
- $tail_option = ", lower.tail = TRUE";
- $tail_label = ", \"Tail\",\"Lower\"";
- } else {
- $tail_option = ", lower.tail = FALSE";
- $tail_label = ", \"Tail\",\"Upper\"";
- }
- if ($log) $log_option = ", log.p=TRUE";
- }
- if ($log) $log_label = ', "Scale", "logarithmic"';
- else $log_label = ', "Scale", "normal"';
-
- $options = array ();
- $options['is_density'] = $is_density;
- $options['label'] = $label;
- $options['tail_option'] = $tail_option;
- $options['tail_label'] = $tail_label;
- $options['log_option'] = $log_option;
- $options['log_label'] = $log_label;
-
- getParameters ();
-
- if ($final) {
- doHeader (); ?>
-
-rk.graph.on ()
-<? }
-?>
-try ({
- curve (<? doFunCall (); ?>, from=<? echo ($options['min']); ?>, to=<? echo ($options['max']); ?>, n=<? echo ($options['n']); ?><? getRK ("plotoptions.code.printout"); ?>)
-<?
- $plot_adds = getRK_val ("plotoptions.code.calculate");
- if (!empty ($plot_adds)) { ?>
-
-<?
- printIndented ("\t", $plot_adds);
- } ?>
-})
-<? if ($final) { ?>
-rk.graph.off ()
-<? }
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,28 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['rate'] = getRK_val ("rate");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dexp";
- } else {
- $options['fun'] = "pexp";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Exponential ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Rate", "' . $options['rate'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, rate=' . $options['rate'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_exponential_distribution.php" />
+ <code file="plot_exponential_distribution.js" />
<help file="plot_exponential_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,30 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['df1'] = getRK_val ("df1");
- $options['df2'] = getRK_val ("df2");
- $options['ncp'] = getRK_val ("ncp");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "df";
- } else {
- $options['fun'] = "pf";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("F ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Numerator degrees of freedom", "' . $options['df1'] . '", "Denominator degrees of freedom", "' . $options['df2'] . '", "Non-centrality", "' . $options['ncp'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, df1=' . $options['df1'] . ', df2=' . $options['df2'] . ', ncp=' . $options['ncp'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
-<!--This is the simple "Plot F probabilities" plugin--><document>
- <code file="plot_f_distribution.php" />
+<document>
+ <code file="plot_f_distribution.js" />
<help file="plot_f_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['shape'] = getRK_val ("shape");
- $options['rate'] = getRK_val ("rate");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dgamma";
- } else {
- $options['fun'] = "pgamma";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Gamma ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Shape", "' . $options['shape'] . '", "Rate", "' . $options['rate'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, shape=' . $options['shape'] . ', rate=' . $options['rate'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_gamma_distribution.php" />
+ <code file="plot_gamma_distribution.js" />
<help file="plot_gamma_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,28 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['prob'] = getRK_val ("prob");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dgeom";
- } else {
- $options['fun'] = "pgeom";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Geometric ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Probability of success on each trial", "' . $options['prob'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, prob=' . $options['prob'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_geometric_distribution.php" />
+ <code file="plot_geometric_distribution.js" />
<help file="plot_geometric_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,30 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['n_val'] = getRK_val ("n_val");
- $options['m'] = getRK_val ("m");
- $options['k'] = getRK_val ("k");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dhyper";
- } else {
- $options['fun'] = "phyper";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Hypergeometric ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Number of white balls", "' . $options['m'] . '", "Number of black balls", "' . $options['n_val'] . '", "Number of balls drawn", "' . $options['k'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, m=' . $options['m'] . ', n=' . $options['n_val'] . ', k=' . $options['k'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_hypergeometric_distribution.php" />
+ <code file="plot_hypergeometric_distribution.js" />
<help file="plot_hypergeometric_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['loc'] = getRK_val ("loc");
- $options['scale'] = getRK_val ("scale");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dlogis";
- } else {
- $options['fun'] = "plogis";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Logistic ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Location", "' . $options['loc'] . '", "Scale", "' . $options['scale'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, location=' . $options['loc'] . ', scale=' . $options['scale'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
-<!--This is the simple "Plot logistic probabilities" plugin--><document>
- <code file="plot_logistic_distribution.php" />
+<document>
+ <code file="plot_logistic_distribution.js" />
<help file="plot_logistic_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['sd'] = getRK_val ("sd");
- $options['mean'] = getRK_val ("mean");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dlnorm";
- } else {
- $options['fun'] = "plnorm";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Lognormal ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Mean", "' . $options['mean'] . '", "Standard deviation", "' . $options['sd'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, meanlog=' . $options['mean'] . ', sdlog=' . $options['sd'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_lognormal_distribution.php" />
+ <code file="plot_lognormal_distribution.js" />
<help file="plot_lognormal_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,47 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- if (getRK_val ("param") == "pprob") {
- $size = getRK_val ("size_trial");
- $size_label = "Target for number of successful trials";
- $paramTag = ", prob=";
- $paramVal = getRK_val ("prob");
- $paramLabel = "Probability of success in each trial";
- } else {
- $size = getRK_val ("size_disp");
- $size_label = "Dispersion (size)";
- $paramTag = ", mu=";
- $paramVal = getRK_val ("mu");
- $paramLabel = "Alternative parameter, mu";
- }
-
- $options['size'] = $size;
- $options['size_label'] = $size_label;
- $options['param_tag'] = $paramTag;
- $options['param_val'] = $paramVal;
- $options['param_label'] = $paramLabel;
- $options['prob'] = getRK_val ("prob");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dnbinom";
- } else {
- $options['fun'] = "pnbinom";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Negative Binomial ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "' . $options['size_label'] . '", "' . $options['size'] . '", "' . $options['param_label'] . '", "' . $options['param_val'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, size=' . $options['size'] . $options['param_tag'] . $options['param_val'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_negbinomial_distribution.php" />
+ <code file="plot_negbinomial_distribution.js" />
<help file="plot_negbinomial_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['mean'] = getRK_val ("mean");
- $options['sd'] = getRK_val ("sd");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dnorm";
- } else {
- $options['fun'] = "pnorm";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Normal ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Mean", "' . $options['mean'] . '", "Standard Deviation", "' . $options['sd'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, mean=' . $options['mean'] . ', sd=' . $options['sd'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_normal_distribution.php" />
+ <code file="plot_normal_distribution.js" />
<help file="plot_normal_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,28 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['mean'] = getRK_val ("mean");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dpois";
- } else {
- $options['fun'] = "ppois";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Poisson ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Mean", "' . $options['mean'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, lambda=' . $options['mean'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_poisson_distribution.php" />
+ <code file="plot_poisson_distribution.js" />
<help file="plot_poisson_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['ncp'] = getRK_val ("ncp");
- $options['df'] = getRK_val ("df");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dt";
- } else {
- $options['fun'] = "pt";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Student t ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Minimum", "' . $options['min'] . '", "Maximum", "' . $options['max'] . '", "Degrees of freedom", "' . $options['df'] . '", "Non-centrality", "' . $options['ncp'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, df=' . $options['df'] . ', ncp=' . $options['ncp'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_t_distribution.php" />
+ <code file="plot_t_distribution.js" />
<help file="plot_t_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,31 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['df'] = getRK_val ("df");
- $options['nmeans'] = getRK_val ("nmeans");
- $options['nranges'] = getRK_val ("nranges");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- // actually, this can never happen in this case, but we add it here, for consistency with the other plugins
- $options['fun'] = "dtukey";
- } else {
- $options['fun'] = "ptukey";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Tukey ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Sample size for range", "' . $options['nmeans'] . '", "Degreed of freedom for s", "' . $options['df'] . '", "Number of groups", "' . $options['nranges'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, nmeans=' . $options['nmeans'] . ', df=' . $options['df'] . ', nranges=' . $options['nranges'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_tukey_distribution.php" />
+ <code file="plot_tukey_distribution.js" />
<help file="plot_tukey_distribution.rkh" />
<logic>
<set id="function.enabled" to="false" />
Modified: trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['llim'] = getRK_val ("llim");
- $options['ulim'] = getRK_val ("ulim");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dunif";
- } else {
- $options['fun'] = "punif";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Uniform ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Minimum", "' . $options['llim'] . '", "Maximum", "' . $options['ulim'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, min=' . $options['llim'] . ', max=' . $options['ulim'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_uniform_distribution.php" />
+ <code file="plot_uniform_distribution.js" />
<help file="plot_uniform_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['scale'] = getRK_val ("scale");
- $options['shape'] = getRK_val ("shape");
- getContRangeParameters ();
-
- if ($options['is_density']) {
- $options['fun'] = "dweibull";
- } else {
- $options['fun'] = "pweibull";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Weibull ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Shape", "' . $options['shape'] . '", "Scale", "' . $options['scale'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, shape=' . $options['shape'] . ', scale=' . $options['scale'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_weibull_distribution.php" />
+ <code file="plot_weibull_distribution.js" />
<help file="plot_weibull_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,12 +1,5 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
// globals
var options;
-var undefined;
include ('plot_dist_common.js');
Deleted: trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,29 +0,0 @@
-<?
-include ("plot_dist_common.php");
-
-function getParameters () {
- global $options;
-
- $options['nm'] = getRK_val ("nm");
- $options['nn'] = getRK_val ("nn");
- getDiscontRangeParameters();
-
- if ($options['is_density']) {
- $options['fun'] = "dwilcox";
- } else {
- $options['fun'] = "pwilcox";
- }
-}
-
-function doHeader () {
- global $options;
-
- echo ('rk.header ("Binomial ' . $options['label'] . ' function", list ("Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "First sample size", "' . $options['nm'] . '", "Second sample size", "' . $options['nn'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
-}
-
-function doFunCall () {
- global $options;
-
- echo ($options['fun'] . '(x, m=' . $options['nm'] . ', n=' . $options['nn'] . $options['log_option'] . $options['tail_option'] . ')');
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_wilcoxon_distribution.php" />
+ <code file="plot_wilcoxon_distribution.js" />
<help file="plot_wilcoxon_distribution.rkh" />
<logic>
<insert snippet="common_logic"/>
Modified: trunk/rkward/rkward/plugins/distributions/poisson_probabilities.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/poisson_probabilities.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/poisson_probabilities.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (ppois (q = ' + q + ', lambda = ' + getValue ("lambda") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/poisson_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/poisson_probabilities.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/poisson_probabilities.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $q;
- $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
-?>
-result <- (ppois (q = <? echo ($q); ?>, lambda = <? getRK ("lambda"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $q;
-?>
-rk.header ("Poisson probability", list ("Vector of quantiles", "<? echo ($q); ?>", "Lambda", "<? getRK ("lambda"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Poisson probabilities")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/poisson_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/poisson_probabilities.xml 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/poisson_probabilities.xml 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="poisson_probabilities.php" />
+ <code file="poisson_probabilities.js" />
<snippets>
<snippet id="dist_options">
<spinbox default_precision="2" type="real" min="0" initial="1" id="lambda" label="Lambda"/>
Modified: trunk/rkward/rkward/plugins/distributions/poisson_quantiles.js
===================================================================
--- trunk/rkward/rkward/plugins/distributions/poisson_quantiles.js 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/poisson_quantiles.js 2010-03-03 12:20:37 UTC (rev 2758)
@@ -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 <- (qpois (p = ' + p + ', lambda = ' + getValue ("lambda") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
}
Deleted: trunk/rkward/rkward/plugins/distributions/poisson_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/poisson_quantiles.php 2010-03-03 10:19:04 UTC (rev 2757)
+++ trunk/rkward/rkward/plugins/distributions/poisson_quantiles.php 2010-03-03 12:20:37 UTC (rev 2758)
@@ -1,20 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
- global $p;
- $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
-?>
-result <- (qpois (p = <? echo ($p); ?>, lambda = <? getRK ("lambda"); ?>, <? getRK ("tail"); ?>, <? getRK("logp"); ?>))
-<?
-}
-
-function printout () {
- global $p;
-?>
-rk.header ("Poisson quantile", list ("Vector of probabilities", "<? echo ($p); ?>", "Lambda", "<? getRK ("lambda"); ?>", "Tail", "<? getRK ("tail"); ?>", "Probabilities p are given as", "<? getRK ("logp"); ?>"))
-rk.results (result, titles="Poisson quantiles")
-<?
-}
-?>
Modified: trunk/rkward/rkward/plugins/distributions/poisson_quantiles.xml
===================================================================
@@ 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