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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue May 8 16:41:03 UTC 2007


Revision: 1884
          http://svn.sourceforge.net/rkward/?rev=1884&view=rev
Author:   tfry
Date:     2007-05-08 09:41:02 -0700 (Tue, 08 May 2007)

Log Message:
-----------
Starting to use snippets for the probabilities/quantiles plugins

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml
    trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
    trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml

Added Paths:
-----------
    trunk/rkward/rkward/plugins/distributions/dist_snippets.xml

Modified: trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml	2007-05-08 12:46:31 UTC (rev 1883)
+++ trunk/rkward/rkward/plugins/distributions/beta_probabilities.xml	2007-05-08 16:41:02 UTC (rev 1884)
@@ -1,35 +1,15 @@
 <!DOCTYPE rkplugin>
-<!--This is the "Beta probability" plugin-->
-
 <document>
-   <code file="beta_probabilities.php" />
-   <dialog label="Beta probability" >
-      <tabbook>
-         <tab label="Beta probability" >
-            <row>
-               <column>
-                  <input required="true" initial="0.95" id="q" label="Vector of quantiles"/>
-                  <spinbox type="real" initial="1" id="shape1" min="0" label="Shape 1"/>
-                  <spinbox type="real" initial="1" id="shape2" min="0" label="Shape 2"/>
-                  <spinbox type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/>
-               </column>
-               <column>
-                  <row>
-                     <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>
-                  </row>
-                  <row>
-                     <radio id="logp" label="probabilities p are given as:" >
-                        <option value="log.p = FALSE" label="not log(p)" />
-                        <option value="log.p = TRUE" label="log(p)" />
-                     </radio>
-                  </row>
-                  <stretch/>
-               </column>
-            </row>
-         </tab>
-      </tabbook>
-   </dialog>
+	<code file="beta_probabilities.php" />
+	<snippets>
+		<snippet id="dist_options">
+			<spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/>
+			<spinbox default_precision="2" type="real" initial="1" id="shape2" min="0" label="Shape 2"/>
+			<spinbox default_precision="2" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/>
+		</snippet>
+		<include file="dist_snippets.xml"/>
+	</snippets>
+	<dialog label="Beta probability" >
+		<insert snippet="probabilities_layout"/>
+	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml	2007-05-08 12:46:31 UTC (rev 1883)
+++ trunk/rkward/rkward/plugins/distributions/beta_quantiles.xml	2007-05-08 16:41:02 UTC (rev 1884)
@@ -1,35 +1,15 @@
 <!DOCTYPE rkplugin>
-<!--This is the "Beta quantiles" plugin-->
-
 <document>
-   <code file="beta_quantiles.php" />
-   <dialog label="Beta quantiles" >
-      <tabbook>
-         <tab label="Beta quantiles" >
-            <row>
-               <column>
-                  <input required="true" initial="0.95" id="p" label="Vector of probabilities"/>
-                  <spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/>
-                  <spinbox default_precision="2" type="real" initial="1" id="shape2" min="0" label="Shape 2"/>
-                  <spinbox default_precision="2" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/>
-               </column>
-               <column>
-                  <row>
-                     <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>
-                  </row>
-                  <row>
-                     <radio id="logp" label="probabilities p are given as:" >
-                        <option value="log.p = FALSE" label="not log(p)" />
-                        <option value="log.p = TRUE" label="log(p)" />
-                     </radio>
-                  </row>
-                  <stretch/>
-               </column>
-            </row>
-         </tab>
-      </tabbook>
-   </dialog>
+	<code file="beta_quantiles.php" />
+	<snippets>
+		<snippet id="dist_options">
+			<spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/>
+			<spinbox default_precision="2" type="real" initial="1" id="shape2" min="0" label="Shape 2"/>
+			<spinbox default_precision="2" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/>
+		</snippet>
+		<include file="dist_snippets.xml"/>
+	</snippets>
+	<dialog label="Beta quantiles" >
+		<insert snippet="quantiles_layout"/>
+	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml	2007-05-08 12:46:31 UTC (rev 1883)
+++ trunk/rkward/rkward/plugins/distributions/binomial_quantiles.xml	2007-05-08 16:41:02 UTC (rev 1884)
@@ -1,34 +1,14 @@
 <!DOCTYPE rkplugin>
-<!--This is the "Binomial quantile" plugin-->
-
 <document>
-  <code file="binomial_quantiles.php" />
-  <dialog label="Binomial quantile" >
-    <tabbook>
-      <tab label="Binomial quantile" >
-          <row>
-            <column>
-              <input required="true" initial="0.95" id="p" min="0" max="1" label="Vector of probabilities"/>
-              <spinbox default_precision="2" type="real" initial="1" 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>
-              <row>
-               <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>
-              </row>
-              <row>
-               <radio id="logp" label="probabilities p are given as:" >
-                <option value="log.p = FALSE" label="not log(p)" />
-                <option value="log.p = TRUE" label="log(p)" />
-               </radio>
-              </row>
-              <stretch/>
-            </column>
-          </row>
-      </tab>
-    </tabbook>
-  </dialog>
+	<code file="binomial_quantiles.php" />
+	<snippets>
+		<snippet id="dist_options">
+			<spinbox default_precision="2" type="real" initial="1" 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"/>
+		</snippet>
+		<include file="dist_snippets.xml"/>
+	</snippets>
+	<dialog label="Binomial quantiles" >
+		<insert snippet="quantiles_layout"/>
+	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml	2007-05-08 12:46:31 UTC (rev 1883)
+++ trunk/rkward/rkward/plugins/distributions/binomial_tail_probabilities.xml	2007-05-08 16:41:02 UTC (rev 1884)
@@ -1,34 +1,14 @@
 <!DOCTYPE rkplugin>
-<!--This is the "Binomial tail probability" plugin-->
-
 <document>
-  <code file="binomial_tail_probabilities.php" />
-  <dialog label="Binomial tail probability" >
-    <tabbook>
-      <tab label="Binomial tail probability" >
-          <row>
-            <column>
-              <input required="true" initial="0.95" 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>
-             <row>
-              <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>
-             </row>
-             <row>
-              <radio id="logp" label="probabilities p are given as:" >
-               <option value="log.p = FALSE" label="not log(p)" />
-               <option value="log.p = TRUE" label="log(p)" />
-              </radio>
-             </row>
-              <stretch/>
-            </column>
-          </row>
-      </tab>
-    </tabbook>
-  </dialog>
+	<code file="binomial_tail_probabilities.php" />
+	<snippets>
+		<snippet id="dist_options">
+			<spinbox default_precision="2" type="real" initial="1" 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"/>
+		</snippet>
+		<include file="dist_snippets.xml"/>
+	</snippets>
+	<dialog label="Binomial tail probability" >
+		<insert snippet="probabilities_layout"/>
+	</dialog>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/dist_snippets.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/dist_snippets.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/dist_snippets.xml	2007-05-08 16:41:02 UTC (rev 1884)
@@ -0,0 +1,41 @@
+<!-- Snippets for the XYZ quantiles and probabilities plugins -->
+<document>
+	<snippet id="probabilities_layout">
+		<row>
+			<column>
+				<input required="true" initial="0.95" id="q" label="Vector of quantiles"/>
+				<insert snippet="dist_options"/>
+			</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>
+				<radio id="logp" label="probabilities p are given as:" >
+					<option value="log.p = FALSE" label="not log(p)" />
+					<option value="log.p = TRUE" label="log(p)" />
+				</radio>
+				<stretch/>
+			</column>
+		</row>
+	</snippet>
+	<snippet id="quantiles_layout">
+		<row>
+			<column>
+				<input required="true" initial="0.95" id="p" label="Vector of probabilities"/>
+				<insert snippet="dist_options"/>
+			</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>
+				<radio id="logp" label="probabilities p are given as:" >
+					<option value="log.p = FALSE" label="not log(p)" />
+					<option value="log.p = TRUE" label="log(p)" />
+				</radio>
+				<stretch/>
+			</column>
+		</row>
+	</snippet>
+</document>


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