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

sjar at users.sourceforge.net sjar at users.sourceforge.net
Tue Feb 27 21:57:06 UTC 2007


Revision: 1499
          http://svn.sourceforge.net/rkward/?rev=1499&view=rev
Author:   sjar
Date:     2007-02-27 13:57:06 -0800 (Tue, 27 Feb 2007)

Log Message:
-----------
new stem plot plug-in (the simple one, not that from Rcmdr package)

Added Paths:
-----------
    trunk/rkward/rkward/plugins/plots/stem.php
    trunk/rkward/rkward/plugins/plots/stem.rkh
    trunk/rkward/rkward/plugins/plots/stem.xml

Added: trunk/rkward/rkward/plugins/plots/stem.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/stem.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/stem.php	2007-02-27 21:57:06 UTC (rev 1499)
@@ -0,0 +1,30 @@
+<?
+function preprocess () {
+}
+
+function calculate () {
+?>
+rk.temp.x <- substitute (<? getRK ("x"); ?>)
+<?
+	}
+?>
+
+<?
+
+
+function printout () {
+?>
+rk.header ("Stem-and-Leaf Plot",
+	parameters=list ("Variable", paste (rk.get.description (rk.temp.x, is.substitute=TRUE)), "Plot Length", "<? getRK ("scale"); ?>","Plot Width", "<? getRK ("width"); ?>", "Tolerance", "<? getRK ("atom"); ?>"))
+
+rk.print.literal(capture.output(stem(<? getRK ("x"); ?>, scale = <? getRK ("scale"); ?>, width = <? getRK ("width"); ?>, atom = <? getRK ("atom"); ?>)))
+
+<?
+}
+
+function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>

Added: trunk/rkward/rkward/plugins/plots/stem.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/stem.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/stem.rkh	2007-02-27 21:57:06 UTC (rev 1499)
@@ -0,0 +1,24 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This produces a stem-and-leaf plot.
+	</summary>
+
+	<usage>
+		Chose the data to produce the stem-and-leaf plot. See <link href="rkward://rhelp/stem"/>. For a more sophisticated stem-and-leaf plot refere to the <link href="http://cran.r-project.org/src/contrib/Descriptions/Rcmdr.html">Rcmdr package</link>.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
+		<caption id="tab_options"/>
+		<setting id="scale">This controls the length of the plot. A scale of 2 will make the plot roughly twice as long as the default.</setting>
+		<setting id="width">This controls the width of the plot.</setting>
+		<setting id="atom">This defines the tolerance.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/HTMLstem"/></li>
+		</ul>
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/plots/stem.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/stem.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/stem.xml	2007-02-27 21:57:06 UTC (rev 1499)
@@ -0,0 +1,26 @@
+<!DOCTYPE rkplugin>
+
+
+<document>
+	<code file="stem.php"/>	
+	<help file="stem.rkh" />
+	
+	<dialog label="Stem-and-Leaf Plots">
+		<tabbook>
+			<tab id="tab_variables" label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" multi="false" source="vars" required="true" label="variable:"/>
+					</column>
+				</row>
+			</tab>
+			<tab id="tab_options" label="Options">
+				<spinbox type="real" id="scale" label="scale" initial="1"/>
+				<spinbox type="real" id="width" label="width" initial="80"/>
+				<spinbox type="real" id="atom" label="atom" initial="0.00000001"/>
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</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