[rkward-cvs] SF.net SVN: rkward: [859] trunk/rkward/rkward/plugins/distributions
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Oct 12 15:20:27 UTC 2006
Revision: 859
http://svn.sourceforge.net/rkward/?rev=859&view=rev
Author: tfry
Date: 2006-10-12 08:19:39 -0700 (Thu, 12 Oct 2006)
Log Message:
-----------
Distribution-plugins updates by sjar part 1: Convert existing plugins to accept vectors
Modified Paths:
--------------
trunk/rkward/rkward/plugins/distributions/binomial_probabilities.php
trunk/rkward/rkward/plugins/distributions/binomial_probabilities.xml
trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php
trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php
trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml
trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php
trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml
trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php
trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml
trunk/rkward/rkward/plugins/distributions/f_probabilities.php
trunk/rkward/rkward/plugins/distributions/f_probabilities.xml
trunk/rkward/rkward/plugins/distributions/f_quantiles.php
trunk/rkward/rkward/plugins/distributions/f_quantiles.xml
trunk/rkward/rkward/plugins/distributions/normal_probabilities.php
trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml
trunk/rkward/rkward/plugins/distributions/normal_quantiles.php
trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml
trunk/rkward/rkward/plugins/distributions/t_probabilities.php
trunk/rkward/rkward/plugins/distributions/t_probabilities.xml
trunk/rkward/rkward/plugins/distributions/t_quantiles.php
trunk/rkward/rkward/plugins/distributions/t_quantiles.xml
Modified: trunk/rkward/rkward/plugins/distributions/binomial_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,27 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp <- (pbinom (q = <? getRK ("q"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
+rk.temp <- (pbinom (q = <? echo ($q); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
+ //produce the output
?>
-rk.header ("Binomial tail probability", list ("Variable value", "<? getRK ("q"); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Binomial tail probability", list ("Variable value", "<? echo ($q); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Binomial tail probability: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/binomial_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -2,25 +2,25 @@
<!--This is the "Binomial tail probability" plugin-->
<document>
- <code file="binomial_probabilities.php" />
- <dialog label="Binomial tail probability" >
- <tabbook>
- <tab label="Binomial tail probability" >
- <row>
- <column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="size" min="0" label="Binomial trials"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
- </column>
- <column>
- <radio id="tail" label="Choose type of probability" >
- <option value="lower.tail=TRUE" label="lower tail" />
- <option value="lower.tail=FALSE" label="upper tail" />
- </radio>
- <stretch/>
- </column>
- </row>
- </tab>
- </tabbook>
- </dialog>
+ <code file="binomial_probabilities.php" />
+ <dialog label="Binomial tail probability" >
+ <tabbook>
+ <tab label="Binomial tail probability" >
+ <row>
+ <column>
+ <input id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="1" id="size" min="0" label="Binomial trials"/>
+ <spinbox default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
+ </column>
+ <column>
+ <radio id="tail" label="Choose type of probability" >
+ <option value="lower.tail=TRUE" label="lower tail" />
+ <option value="lower.tail=FALSE" label="upper tail" />
+ </radio>
+ <stretch/>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
</document>
Modified: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,27 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $p;
+ $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
?>
-rk.temp = (qbinom (p = <? getRK ("p"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (qbinom (p = <? echo ($p); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
<?
- }
+}
- function printout () {
-
- //produce the output
+function printout () {
+ //produce the output
+ global $p;
?>
-rk.header ("Binomial quantile", list ("Probabilities [0,1]", "<? getRK ("p"); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Binomial quantile", list ("Probabilities [0,1]", "<? echo ($p); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Binomial quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -8,9 +8,9 @@
<tab label="Binomial quantile" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="size" min="1" label="Binomial trials"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
+ <input id="p" min="0" max="1" label="Probability"/>
+ <spinbox default_precision="2" type="real" initial="0" id="size" min="1" label="Binomial trials"/>
+ <spinbox default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp = (pbinom (q = <? getRK ("q"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (pbinom (q = <? echo ($q); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
?>
-rk.header ("Binomial tail probability", list ("Variable value", "<? getRK ("q"); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Binomial tail probability", list ("Variable value", "<? echo ($q); ?>", "Binomial trials", "<? getRK ("size"); ?>", "Probability of success", "<? getRK ("prob"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Binomial tail probability: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -8,9 +8,9 @@
<tab label="Binomial tail probability" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="size" min="0" label="Binomial trials"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
+ <input id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="1" id="size" min="0" label="Binomial trials"/>
+ <spinbox default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp <- (pchisq (q = <? getRK ("q"); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
+rk.temp <- (pchisq (q = <? echo ($q); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
?>
-rk.header ("Chi-squared probability", list ("Variable value", "<? getRK ("q"); ?>", "Degrees of Freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Chi-squared probability", list ("Variable value", "<? echo ($q); ?>", "Degrees of Freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Chi-squared probaility: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -7,9 +7,9 @@
<tab label="Chi-squared probability" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
+ <input id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
+ <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
@@ -20,6 +20,6 @@
</column>
</row>
</tab>
- </tabbook>
+ </tabbook>
</dialog>
</document>
Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $p;
+ $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
?>
-rk.temp = (qchisq (p = <? getRK ("p"); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (qchisq (p = <? echo ($p); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $p;
?>
-rk.header ("Chi-squared quantile", list ("Probabilities [0,1]", "<? getRK ("p"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Chi-squared quantile", list ("Probabilities [0,1]", "<? echo ($p); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Chi-squared quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/chi_squared_quantiles.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,24 +1,25 @@
<!DOCTYPE rkplugin>
-<!--This is the "Chi-squared quantile" plugin--><document>
- <code file="chi_squared_quantiles.php" />
- <dialog label="Chi-squared quantile" >
- <tabbook>
- <tab label="Chi-squared quantile" >
- <row>
- <column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
- </column>
- <column>
- <radio id="tail" label="Choose type of probability" >
- <option value="lower.tail=TRUE" label="lower tail" />
- <option value="lower.tail=FALSE" label="upper tail" />
- </radio>
- <stretch/>
- </column>
- </row>
- </tab>
- </tabbook>
- </dialog>
+<!--This is the "Chi-squared quantile" plugin-->
+<document>
+ <code file="chi_squared_quantiles.php" />
+ <dialog label="Chi-squared quantile" >
+ <tabbook>
+ <tab label="Chi-squared quantile" >
+ <row>
+ <column>
+ <input id="p" min="0" max="1" label="Probability"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
+ <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
+ </column>
+ <column>
+ <radio id="tail" label="Choose type of probability" >
+ <option value="lower.tail=TRUE" label="lower tail" />
+ <option value="lower.tail=FALSE" label="upper tail" />
+ </radio>
+ <stretch/>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
</document>
Modified: trunk/rkward/rkward/plugins/distributions/f_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/f_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp <- (pf (q = <? getRK ("q"); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
+rk.temp <- (pf (q = <? echo ($q); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
?>
-rk.header ("F probability", list ("Variable value", "<? getRK ("q"); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("F probability", list ("Variable value", "<? echo ($q); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "non-centrality parameter", "<? getRK ("ncp"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>F probability: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/f_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/f_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,15 +1,16 @@
<!DOCTYPE rkplugin>
-<!--This is the "F probability" plugin--><document>
+<!--This is the "F probability" plugin-->
+<document>
<code file="f_probabilities.php" />
<dialog label="F probability" >
<tabbook>
<tab label="F probability" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" label="Variable value"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
+ <input id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/>
+ <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/f_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_quantiles.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/f_quantiles.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $p;
+ $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
?>
-rk.temp = (qf (p = <? getRK ("p"); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (qf (p = <? echo ($p); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $p;
?>
-rk.header ("F quantile", list ("Probabilities [0,1]", "<? getRK ("p"); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("F quantile", list ("Probabilities [0,1]", "<? echo ($p); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>F quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/f_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/f_quantiles.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/f_quantiles.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,14 +1,15 @@
<!DOCTYPE rkplugin>
-<!--This is the "F quantile" plugin--><document>
+<!--This is the "F quantile" plugin-->
+<document>
<code file="f_quantiles.php" />
<dialog label="F quantile" >
<tabbook>
<tab label="F quantile" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/>
+ <input id="p" min="0" max="1" label="Probability"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/normal_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/normal_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp = (pnorm (q = <? getRK ("q"); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (pnorm (q = <? echo ($q); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
?>
-rk.header ("Normal probabilities", list ("Variable value(s)", "<? getRK ("q"); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Normal probabilities", list ("Variable value(s)", "<? echo ($q); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Normal quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/normal_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -4,12 +4,12 @@
<code file="normal_probabilities.php" />
<dialog label="Normal probabilities" >
<tabbook>
- <tab label="Normal probabilities" >
+ <tab label="Normal probabilities" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" label="Variable value(s)"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="mean" label="mu (mean)"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="sd" label="sigma (standard deviation)"/>
+ <input id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="0" id="mean" label="mu (mean)"/>
+ <spinbox default_precision="2" type="real" initial="1" id="sd" label="sigma (standard deviation)"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/normal_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_quantiles.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/normal_quantiles.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $p;
+ $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
?>
-rk.temp = (qnorm (p = <? getRK ("p"); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (qnorm (p = <? echo ($p); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $p;
?>
-rk.header ("Normal quantile", list ("Probabilities [0,1]", "<? getRK ("p"); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("Normal quantile", list ("Probabilities [0,1]", "<? echo ($p); ?>", "mu", "<? getRK ("mean"); ?>", "sigma", "<? getRK ("sd"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>Normal quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/normal_quantiles.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -7,9 +7,9 @@
<tab label="Normal quantile" >
<row>
<column>
- <spinbox max_precision="4" default_precision="4" type="real" initial="0.95" id="p" min="0" max="1" label="probability [0,1]" />
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="mean" label="mu (mean)" />
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="sd" label="sigma (standard deviation)" />
+ <input id="p" min="0" max="1" label="probability [0,1]" />
+ <spinbox default_precision="2" type="real" initial="0" id="mean" label="mu (mean)" />
+ <spinbox default_precision="2" type="real" initial="1" id="sd" label="sigma (standard deviation)" />
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/t_probabilities.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/t_probabilities.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/t_probabilities.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $q;
+ $q = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("q")) . ")";
?>
-rk.temp = (pt (q = <? getRK ("q"); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (pt (q = <? echo ($q); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $q;
?>
-rk.header ("t probability", list ("Variable value", "<? getRK ("q"); ?>", "Degrees of Freedom", "<? getRK ("df"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("t probability", list ("Variable value", "<? echo ($q); ?>", "Degrees of Freedom", "<? getRK ("df"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>t probability: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/t_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/t_probabilities.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/t_probabilities.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -7,8 +7,8 @@
<tab label="t probability" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df" min="0" label="Degree of Freedom"/>
+ <input initial="0.95" id="q" label="Vector of quantiles"/>
+ <spinbox default_precision="2" type="real" initial="0" id="df" min="0" label="Degree of Freedom"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
Modified: trunk/rkward/rkward/plugins/distributions/t_quantiles.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/t_quantiles.php 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/t_quantiles.php 2006-10-12 15:19:39 UTC (rev 859)
@@ -1,25 +1,26 @@
<?
- function preprocess () {
- }
-
- function calculate () {
+function preprocess () {
+}
+
+function calculate () {
+ global $p;
+ $p = "c (" . preg_replace ("/[, ]+/", ", ", getRK_val ("p")) . ")";
?>
-rk.temp = (qt (p = <? getRK ("p"); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
+rk.temp = (qt (p = <? echo ($p); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
<?
- }
-
- function printout () {
+}
- //produce the output
+function printout () {
+ global $p;
?>
-rk.header ("t quantile", list ("Probabilities [0,1]", "<? getRK ("p"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Tail", "<? getRK ("tail"); ?>"));
+rk.header ("t quantile", list ("Probabilities [0,1]", "<? echo ($p); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Tail", "<? getRK ("tail"); ?>"));
cat ("<h3>t quantile: ", rk.temp, "</h3>")
<?
- }
-
- function cleanup () {
+}
+
+function cleanup () {
?>
rm (rk.temp)
<?
- }
+}
?>
Modified: trunk/rkward/rkward/plugins/distributions/t_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/t_quantiles.xml 2006-10-12 12:59:20 UTC (rev 858)
+++ trunk/rkward/rkward/plugins/distributions/t_quantiles.xml 2006-10-12 15:19:39 UTC (rev 859)
@@ -7,8 +7,8 @@
<tab label="t quantile" >
<row>
<column>
- <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
- <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
+ <input initial="0.95" id="p" min="0" max="1" label="Probability"/>
+ <spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/>
</column>
<column>
<radio id="tail" label="Choose type of probability" >
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