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

sjar at users.sourceforge.net sjar at users.sourceforge.net
Sun Dec 17 16:05:30 UTC 2006


Revision: 1012
          http://svn.sourceforge.net/rkward/?rev=1012&view=rev
Author:   sjar
Date:     2006-12-17 08:05:29 -0800 (Sun, 17 Dec 2006)

Log Message:
-----------
theoretical pnorm is now an option
some code clean up

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/plots/ecdf_plot.php
    trunk/rkward/rkward/plugins/plots/ecdf_plot.xml

Modified: trunk/rkward/rkward/plugins/plots/ecdf_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/ecdf_plot.php	2006-12-17 00:13:04 UTC (rev 1011)
+++ trunk/rkward/rkward/plugins/plots/ecdf_plot.php	2006-12-17 16:05:29 UTC (rev 1012)
@@ -3,9 +3,11 @@
 	}
 	
 	function calculate () {
-?>	rk.min = min (<? getRK("x"); ?>)
-	rk.max = max (<? getRK("x"); ?>)
-	rk.length = length (<? getRK ("x"); ?>)
+?>
+	rk.min <- min (<? getRK("x"); ?>);
+	rk.max <- max (<? getRK("x"); ?>);
+	rk.length <- length (<? getRK ("x"); ?>);
+	doth_pnrom <- <? getRK ("th_pnorm"); ?>;
 <?
 	}
 	
@@ -15,9 +17,9 @@
 ?>
 rk.header ("ECDF", list ("Variable", rk.get.description (<? echo ($x); ?>), "Minimum", rk.min, "Maximum", rk.max, "Length", rk.length))
 rk.graph.on ()
-plot.ecdf (<? echo ($x); ?>, <? getRK ("plotoptions.code.printout"); ?>, <? getRK ("dopoints"); ?>, <? getRK ("vertical"); ?>)
-curve(pnorm, from= rk.min, to= rk.max, add=TRUE, col="<? echo ($col); ?>")
-rug(<? echo ($x); ?>)
+plot.ecdf (<? echo ($x); ?>, <? getRK ("dopoints"); ?>, <? getRK ("verticals"); ?> <? getRK ("plotoptions.code.printout"); ?>)
+if (doth_pnrom) cat (paste (curve(pnorm, from= rk.min, to= rk.max, add=TRUE, col="<? echo ($col); ?>")))
+rug (<? getRK ("x"); ?>)
 rk.graph.off ()
 <?
 	}
@@ -26,6 +28,7 @@
 ?>	rm (rk.min)
 	rm (rk.max)
 	rm (rk.length)
+	rm (doth_pnrom)
 <?
 	}
 ?>

Modified: trunk/rkward/rkward/plugins/plots/ecdf_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/ecdf_plot.xml	2006-12-17 00:13:04 UTC (rev 1011)
+++ trunk/rkward/rkward/plugins/plots/ecdf_plot.xml	2006-12-17 16:05:29 UTC (rev 1012)
@@ -31,6 +31,7 @@
 							<option value="verticals = FALSE" label="Verticals False"/>
 							<option value="verticals = TRUE" label="Verticals TRUE"/>
 						</radio>
+						<checkbox value_unchecked="0" value="1" checked="true" id="th_pnorm" label="Theoretical Normal Distribution" />
 						<input id="col" initial="red" label="Color of Theoretical Normal Distribution"/>
 						<text>R provides you a broad range of colors to use. To change the current just type another like 'blue'. Please refere to the R-help for others than the default (red).
 						</text>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list