[rkward-cvs] SF.net SVN: rkward:[4331] branches

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Sat Sep 29 21:50:22 UTC 2012


Revision: 4331
          http://rkward.svn.sourceforge.net/rkward/?rev=4331&view=rev
Author:   m-eik
Date:     2012-09-29 21:50:21 +0000 (Sat, 29 Sep 2012)
Log Message:
-----------
added a new branch for external plugin sources, at least for those who are also in our repo

Added Paths:
-----------
    branches/external_plugins/
    branches/external_plugins/rk.ANOVA/
    branches/external_plugins/rk.ANOVA/ChangeLog
    branches/external_plugins/rk.ANOVA/DESCRIPTION
    branches/external_plugins/rk.ANOVA/NAMESPACE
    branches/external_plugins/rk.ANOVA/R/
    branches/external_plugins/rk.ANOVA/R/rk.ANOVA-package.R
    branches/external_plugins/rk.ANOVA/inst/
    branches/external_plugins/rk.ANOVA/inst/CITATION
    branches/external_plugins/rk.ANOVA/inst/NEWS.Rd
    branches/external_plugins/rk.ANOVA/inst/rkward/
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.js
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.xml
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.js
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.xml
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.js
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.xml
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.js
    branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.xml
    branches/external_plugins/rk.ANOVA/inst/rkward/rk.ANOVA.pluginmap
    branches/external_plugins/rk.ANOVA/inst/rkward/rkwarddev_ANOVA_plugin_script.R
    branches/external_plugins/rk.ANOVA/man/
    branches/external_plugins/rk.ANOVA/man/rk.ANOVA-package.Rd
    branches/external_plugins/rk.ClusterAnalysis/
    branches/external_plugins/rk.ClusterAnalysis/ChangeLog
    branches/external_plugins/rk.ClusterAnalysis/DESCRIPTION
    branches/external_plugins/rk.ClusterAnalysis/NAMESPACE
    branches/external_plugins/rk.ClusterAnalysis/R/
    branches/external_plugins/rk.ClusterAnalysis/R/rk.ClusterAnalysis-package.R
    branches/external_plugins/rk.ClusterAnalysis/inst/
    branches/external_plugins/rk.ClusterAnalysis/inst/CITATION
    branches/external_plugins/rk.ClusterAnalysis/inst/NEWS.Rd
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.js
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.xml
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.js
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.xml
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.js
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.xml
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/ModelbasedCA.js
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/ModelbasedCA.xml
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/rk.ClusterAnalysis.pluginmap
    branches/external_plugins/rk.ClusterAnalysis/inst/rkward/rkwarddev_CA_plugin_script.R
    branches/external_plugins/rk.ClusterAnalysis/man/
    branches/external_plugins/rk.ClusterAnalysis/man/rk.ClusterAnalysis-package.Rd
    branches/external_plugins/rk.CohenKappa/
    branches/external_plugins/rk.CohenKappa/ChangeLog
    branches/external_plugins/rk.CohenKappa/DESCRIPTION
    branches/external_plugins/rk.CohenKappa/NAMESPACE
    branches/external_plugins/rk.CohenKappa/R/
    branches/external_plugins/rk.CohenKappa/R/rk.CohenKappa-package.R
    branches/external_plugins/rk.CohenKappa/inst/
    branches/external_plugins/rk.CohenKappa/inst/CITATION
    branches/external_plugins/rk.CohenKappa/inst/NEWS.Rd
    branches/external_plugins/rk.CohenKappa/inst/rkward/
    branches/external_plugins/rk.CohenKappa/inst/rkward/plugins/
    branches/external_plugins/rk.CohenKappa/inst/rkward/plugins/CohensKappa.js
    branches/external_plugins/rk.CohenKappa/inst/rkward/plugins/CohensKappa.xml
    branches/external_plugins/rk.CohenKappa/inst/rkward/rk.CohenKappa.pluginmap
    branches/external_plugins/rk.CohenKappa/inst/rkward/rkwarddev_plugin_script_kappa.R
    branches/external_plugins/rk.CohenKappa/man/
    branches/external_plugins/rk.CohenKappa/man/rk.CohenKappa-package.Rd
    branches/external_plugins/rk.FactorAnalysis/
    branches/external_plugins/rk.FactorAnalysis/ChangeLog
    branches/external_plugins/rk.FactorAnalysis/DESCRIPTION
    branches/external_plugins/rk.FactorAnalysis/NAMESPACE
    branches/external_plugins/rk.FactorAnalysis/R/
    branches/external_plugins/rk.FactorAnalysis/R/rk.FactorAnalysis-package.R
    branches/external_plugins/rk.FactorAnalysis/inst/
    branches/external_plugins/rk.FactorAnalysis/inst/CITATION
    branches/external_plugins/rk.FactorAnalysis/inst/NEWS.Rd
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Correlationplot.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Correlationplot.xml
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.xml
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/ParallelanalysisHorn.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/ParallelanalysisHorn.xml
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Screeplot.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Screeplot.xml
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/rk.FactorAnalysis.pluginmap
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/rkwarddev_plugin_script_FA.R
    branches/external_plugins/rk.FactorAnalysis/man/
    branches/external_plugins/rk.FactorAnalysis/man/rk.FactorAnalysis-package.Rd
    branches/external_plugins/rk.MPT/
    branches/external_plugins/rk.MPT/ChangeLog
    branches/external_plugins/rk.MPT/DESCRIPTION
    branches/external_plugins/rk.MPT/NAMESPACE
    branches/external_plugins/rk.MPT/R/
    branches/external_plugins/rk.MPT/R/rk.MPT-package.R
    branches/external_plugins/rk.MPT/inst/
    branches/external_plugins/rk.MPT/inst/CITATION
    branches/external_plugins/rk.MPT/inst/NEWS.Rd
    branches/external_plugins/rk.MPT/inst/rkward/
    branches/external_plugins/rk.MPT/inst/rkward/plugins/
    branches/external_plugins/rk.MPT/inst/rkward/plugins/MPTinR.js
    branches/external_plugins/rk.MPT/inst/rkward/plugins/MPTinR.xml
    branches/external_plugins/rk.MPT/inst/rkward/plugins/MPTinR2.js
    branches/external_plugins/rk.MPT/inst/rkward/plugins/MPTinR2.xml
    branches/external_plugins/rk.MPT/inst/rkward/rk.MPT.pluginmap
    branches/external_plugins/rk.MPT/inst/rkward/rkwarddev_MPT_plugin_script.R
    branches/external_plugins/rk.MPT/man/
    branches/external_plugins/rk.MPT/man/rk.MPT-package.Rd
    branches/external_plugins/rk.MultidimensionalScaling/
    branches/external_plugins/rk.MultidimensionalScaling/ChangeLog
    branches/external_plugins/rk.MultidimensionalScaling/DESCRIPTION
    branches/external_plugins/rk.MultidimensionalScaling/NAMESPACE
    branches/external_plugins/rk.MultidimensionalScaling/R/
    branches/external_plugins/rk.MultidimensionalScaling/R/rk.MultidimensionalScaling-package.R
    branches/external_plugins/rk.MultidimensionalScaling/inst/
    branches/external_plugins/rk.MultidimensionalScaling/inst/CITATION
    branches/external_plugins/rk.MultidimensionalScaling/inst/NEWS.Rd
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/plugins/
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/plugins/Multidimensionalscaling.js
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/plugins/Multidimensionalscaling.xml
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/rk.MultidimensionalScaling.pluginmap
    branches/external_plugins/rk.MultidimensionalScaling/inst/rkward/rkwarddev_MDS_plugin_script.R
    branches/external_plugins/rk.MultidimensionalScaling/man/
    branches/external_plugins/rk.MultidimensionalScaling/man/rk.MultidimensionalScaling-package.Rd

Added: branches/external_plugins/rk.ANOVA/ChangeLog
===================================================================
--- branches/external_plugins/rk.ANOVA/ChangeLog	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/ChangeLog	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,14 @@
+ChangeLog for package rk.ANOVA
+
+changes in version 0.01-13 (2012-09-29)
+fixed:
+  - added generic pre/post plot options
+
+changes in version 0.01-12 (2012-08-15)
+fixed:
+  - create a dummy subject ID for pure between designs if none was given, as ezANOVA insists on one
+
+changes in version 0.01-11 (2012-04-06)
+changes:
+  - added a ChangeLog file
+  - rebuild package for R 2.15

Added: branches/external_plugins/rk.ANOVA/DESCRIPTION
===================================================================
--- branches/external_plugins/rk.ANOVA/DESCRIPTION	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/DESCRIPTION	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,23 @@
+Package: rk.ANOVA
+Type: Package
+Title: RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests
+    and plot interactions.
+Version: 0.01-13
+Date: 2012-09-29
+Author: Meik Michalke <meik.michalke at hhu.de>
+Maintainer: Meik Michalke <meik.michalke at hhu.de>
+Depends:
+    rkward (>= 0.5.6)
+Suggests:
+    ez,
+    sciplot
+Enhances: rkward
+Description: RKWard GUI to conduct ANOVAs (using the ez package), pairwise
+    t-Tests and plot interactions.
+License: GPL (>= 3)
+LazyLoad: yes
+URL: http://rkward.sf.net
+Authors at R: person(given="Meik", family="Michalke",
+    email="meik.michalke at hhu.de", role=c("aut", "cre"))
+Collate:
+    'rk.ANOVA-package.R'

Added: branches/external_plugins/rk.ANOVA/NAMESPACE
===================================================================
Added: branches/external_plugins/rk.ANOVA/R/rk.ANOVA-package.R
===================================================================
--- branches/external_plugins/rk.ANOVA/R/rk.ANOVA-package.R	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/R/rk.ANOVA-package.R	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,23 @@
+#' RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions..
+#'
+#' \tabular{ll}{
+#' Package: \tab rk.ANOVA\cr
+#' Type: \tab Package\cr
+#' Version: \tab 0.01-13\cr
+#' Date: \tab 2012-09-29\cr
+#' Depends: \tab  rkward (>= 0.5.6)\cr
+#' Enhances: \tab rkward\cr
+#' License: \tab GPL (>= 3)\cr
+#' LazyLoad: \tab yes\cr
+#' URL: \tab http://rkward.sf.net\cr
+#' }
+#'
+#' RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions.
+#'
+#' @aliases rk.ANOVA-package rk.ANOVA
+#' @name rk.ANOVA-package
+#' @docType package
+#' @title RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions..
+#' @author Meik Michalke \email{meik.michalke@@hhu.de}
+#' @keywords package
+NULL

Added: branches/external_plugins/rk.ANOVA/inst/CITATION
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/CITATION	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/CITATION	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,14 @@
+bibentry("Manual",
+		title="rk.ANOVA: RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions.",
+		author="Meik Michalke",
+		year="2012",
+		note="(Version 0.01-13)",
+		url="http://rkward.sf.net",
+
+		textVersion =
+		paste("Michalke, M. (2012). ",
+				"rk.ANOVA: RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions. (Version 0.01-13). ",
+				"Available from http://rkward.sf.net",
+				sep=""),
+
+		mheader = "To cite rk.ANOVA in publications use:")

Added: branches/external_plugins/rk.ANOVA/inst/NEWS.Rd
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/NEWS.Rd	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/NEWS.Rd	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,24 @@
+\name{NEWS}
+\title{News for Package 'rk.ANOVA'}
+\section{Changes in rk.ANOVA version 0.01-13 (2012-09-29)}{
+  \subsection{fixed}{
+    \itemize{
+      \item added generic pre/post plot options
+    }
+  }
+}
+\section{Changes in rk.ANOVA version 0.01-12 (2012-08-15)}{
+  \subsection{fixed}{
+    \itemize{
+      \item create a dummy subject ID for pure between designs if none was given, as ezANOVA insists on one
+    }
+  }
+}
+\section{Changes in rk.ANOVA version 0.01-11 (2012-04-06)}{
+  \subsection{changes}{
+    \itemize{
+      \item added a ChangeLog file
+      \item rebuild package for R 2.15
+    }
+  }
+}

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.js
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.js	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,99 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+	var chcSpprsspc = getValue("chc_Spprsspc");
+	if(chcSpprsspc) {
+		echo("suppressMessages(require(" + "ez" + "))\n");
+	} else {
+		echo("require(" + "ez" + ")\n");
+	}
+}
+
+function calculate(){
+	// read in variables from dialog
+	var vrslDtmstbdt = getValue("vrsl_Dtmstbdt");
+	var radDesign = getValue("rad_Design");
+	var vrslDpndntvr = getValue("vrsl_Dpndntvr");
+	var vrslCssbjctd = getValue("vrsl_Cssbjctd");
+	var vrslWthnsbjc = getValue("vrsl_Wthnsbjc");
+	var vrslBtwnsbjc = getValue("vrsl_Btwnsbjc");
+	var vrslObsrvdvr = getValue("vrsl_Obsrvdvr");
+	var drpSmsfsqrs = getValue("drp_Smsfsqrs");
+	var drpHtrscdst = getValue("drp_Htrscdst");
+	var chcShwsmsfs = getValue("chc_Shwsmsfs");
+	var chcRtrnvbjc = getValue("chc_Rtrnvbjc");
+	var chcSpprsspc = getValue("chc_Spprsspc");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+
+	// the R code to be evaluated
+	var vrslDpndntvrShortname = getValue("vrsl_Dpndntvr.shortname").split("\n").join(", ");
+	var vrslCssbjctdShortname = getValue("vrsl_Cssbjctd.shortname").split("\n").join(", ");
+	var vrslWthnsbjcShortname = getValue("vrsl_Wthnsbjc.shortname").split("\n").join(", ");
+	var vrslBtwnsbjcShortname = getValue("vrsl_Btwnsbjc.shortname").split("\n").join(", ");
+	var vrslObsrvdvrShortname = getValue("vrsl_Obsrvdvr.shortname").split("\n").join(", ");
+	if(drpSmsfsqrs == 3) {
+		echo("\t# set contrasts for accurate type 3 ANOVA\n\toptions(contrasts=c(\"contr.sum\",\"contr.poly\"))\n");
+	} else {}
+	if(vrslCssbjctd == "" & radDesign == "between") {
+		echo("\t# ezANOVA demands a subject identifier variable\n\t" + vrslDtmstbdt + " <- cbind(" + vrslDtmstbdt + ", ez.subject.ID.dummy=factor(1:nrow(" + vrslDtmstbdt + ")))\n");
+	} else {}
+	echo("\tanova.results <- ezANOVA(");
+	if(vrslDtmstbdt) {
+		echo("\n\t\tdata=" + vrslDtmstbdt);
+	} else {}
+	if(vrslDpndntvr) {
+		echo(",\n\t\tdv=.(" + vrslDpndntvrShortname + ")");
+	} else {}
+	if(vrslCssbjctd) {
+		echo(",\n\t\twid=.(" + vrslCssbjctdShortname + ")");
+	} else if(radDesign == "between") {
+		echo(",\n\t\twid=.(ez.subject.ID.dummy)");
+	}
+	if(vrslWthnsbjc != "" & radDesign != "between") {
+		echo(",\n\t\twithin=.(" + vrslWthnsbjcShortname + ")");
+	} else {}
+	if(vrslBtwnsbjc != "" & radDesign != "within") {
+		echo(",\n\t\tbetween=.(" + vrslBtwnsbjcShortname + ")");
+	} else {}
+	if(vrslObsrvdvr) {
+		echo(",\n\t\tobserved=.(" + vrslObsrvdvrShortname + ")");
+	} else {}
+	if(drpSmsfsqrs != 2) {
+		echo(",\n\t\ttype=" + drpSmsfsqrs);
+	} else {}
+	if(drpHtrscdst != "false") {
+		echo(",\n\t\twhite.adjust=\"" + drpHtrscdst + "\"");
+	} else {}
+	if(chcShwsmsfs) {
+		echo(",\n\t\tdetailed=TRUE");
+	} else {}
+	if(chcRtrnvbjc) {
+		echo(",\n\t\treturn_aov=TRUE");
+	} else {}
+	echo(")\n\n");
+}
+
+function printout(){
+	// printout the results
+	echo("rk.header(\"ANOVA results\")\n");
+
+	echo("rk.print(anova.results[[\"ANOVA\"]])\n");
+	echo("\tif(\"Mauchly's Test for Sphericity\" %in% names(anova.results)){\n\t\trk.header(\"Mauchly's Test for Sphericity\", level=3)\n\t\trk.print(anova.results[[\"Mauchly's Test for Sphericity\"]])\n\t} else {}\n");
+	echo("\tif(\"Sphericity Corrections\" %in% names(anova.results)){\n\t\trk.header(\"Sphericity Corrections\", level=3)\n\t\trk.print(anova.results[[\"Sphericity Corrections\"]])\n\t} else {}\n");
+	echo("\tif(\"Levene's Test for Homgeneity\" %in% names(anova.results)){\n\t\trk.header(\"Levene's Test for Homgeneity\", level=3)\n\t\trk.print(anova.results[[\"Levene's Test for Homgeneity\"]])\n\t} else {}\n");
+	//// save result object
+	// read in saveobject variables
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var svbSvrsltstActive = getValue("svb_Svrsltst.active");
+	var svbSvrsltstParent = getValue("svb_Svrsltst.parent");
+	// assign object to chosen environment
+	if(svbSvrsltstActive) {
+		echo(".GlobalEnv$" + svbSvrsltst + " <- anova.results\n");
+	}
+
+}
+

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.xml
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.xml	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/ANOVA.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,112 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="ANOVA.js" />
+	<help file="ANOVA.rkh" />
+	<include file="../rk.ANOVA.pluginmap" />
+	<logic>
+		<connect governor="current_object" client="vrsl_Dtmstbdt.available" />
+		<connect governor="vrsl_Dtmstbdt.available" client="vrs_Selectdt.root" />
+		<convert id="lgc_vrslDtms" sources="vrsl_Dtmstbdt.available" mode="notequals" />
+		<convert id="lgc_rdDsgnbt" sources="rad_Design.string" mode="equals" standard="between" />
+		<convert id="lgc_rdDsgnwt" sources="rad_Design.string" mode="equals" standard="within" />
+		<convert id="lgc_rdDsgnmx" sources="rad_Design.string" mode="equals" standard="mixed" />
+		<convert id="lgc_bvars" sources="lgc_rdDsgnbt;lgc_rdDsgnmx" mode="or" />
+		<convert id="lgc_vvars" sources="lgc_rdDsgnwt;lgc_rdDsgnmx" mode="or" />
+		<connect governor="lgc_vrslDtms" client="vrsl_Dpndntvr.enabled" />
+		<connect governor="lgc_vrslDtms" client="vrsl_Btwnsbjc.enabled" />
+		<connect governor="lgc_vrslDtms" client="vrsl_Wthnsbjc.enabled" />
+		<connect governor="lgc_vrslDtms" client="vrsl_Cssbjctd.enabled" />
+		<connect governor="lgc_vvars" client="vrsl_Cssbjctd.required" />
+		<connect governor="lgc_bvars" client="vrsl_Btwnsbjc.visible" />
+		<connect governor="lgc_vvars" client="vrsl_Wthnsbjc.visible" />
+		<connect governor="lgc_bvars" client="vrsl_Btwnsbjc.required" />
+		<connect governor="lgc_vvars" client="vrsl_Wthnsbjc.required" />
+		<connect governor="lgc_vrslDtms" client="row_vSSOTOOTOO.enabled" />
+		<connect governor="vrsl_Dtmstbdt.available" client="vrs_Slctbsrv.root" />
+	</logic>
+	<dialog label="ANOVA">
+		<tabbook id="tbbk_ANOVA" label="ANOVA">
+			<tab label="Data" id="tab_Data">
+				<row id="row_vSSDDSDDSD">
+					<varselector id="vrs_Selectdt" label="Select data" />
+					<column id="clm_fDDSDDSDDB">
+						<frame id="frm_vrsltdvDDS">
+							<varslot id="vrsl_Dtmstbdt" label="Data (must be data.frame)" source="vrs_Selectdt" classes="data.frame" required="true" />
+						</frame>
+						<frame id="frm_rddrdDDBWM">
+							<radio id="rad_Design" label="Design">
+								<option label="Between subjects" value="between" />
+								<option label="Within subjects (repeated measures)" value="within" checked="true" />
+								<option label="Mixed" value="mixed" />
+							</radio>
+						</frame>
+						<frame id="frm_vrslDDSCCS">
+							<varslot id="vrsl_Dpndntvr" label="Dependent variable" source="vrs_Selectdt" required="true" />
+							<varslot id="vrsl_Cssbjctd" label="Case/subject identifier" source="vrs_Selectdt" />
+						</frame>
+						<frame id="frm_vrslWWSBBS">
+							<varslot id="vrsl_Wthnsbjc" label="Within subject variables" source="vrs_Selectdt" multi="true" />
+							<varslot id="vrsl_Btwnsbjc" label="Between subject variables" source="vrs_Selectdt" multi="true" />
+						</frame>
+					</column>
+				</row>
+			</tab>
+			<tab label="Observed" id="tab_Observed">
+				<row id="row_vSSOTOOTOO">
+					<varselector id="vrs_Slctbsrv" label="Select observed variables" />
+					<column id="clm_fOTOOTOOOS">
+						<frame id="frm_txtdtxtOTO">
+							<text id="txt_ObsrvdvT">
+								Observed variables are independent variables you have 								<b>
+									already defined
+								</b>
+								as either between or within variables, but that were measured and 								<b>
+									not manipulated
+								</b>
+							</text>
+						</frame>
+						<frame id="frm_vrsltdvOOS">
+							<varslot id="vrsl_Obsrvdvr" label="Observed variables (not manipulated)" source="vrs_Slctbsrv" multi="true" />
+						</frame>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options" id="tab_Options">
+				<row id="row_cSST11T22T">
+					<column id="clm_fSST11T22T">
+						<frame id="frm_dSST11T22T">
+							<dropdown id="drp_Smsfsqrs" label="Sums of squares type for unbalanced designs">
+								<option label="Type 1" value="1" />
+								<option label="Type 2" value="2" checked="true" />
+								<option label="Type 3" value="3" />
+							</dropdown>
+						</frame>
+						<frame id="frm_dHHN3LE30W">
+							<dropdown id="drp_Htrscdst" label="Heteroscedasticity correction">
+								<option label="None" value="false" checked="true" />
+								<option label="hc3 (Long & Ervin; default)" value="hc3" />
+								<option label="hc0 (White)" value="hc0" />
+								<option label="hc1 (Long & Ervin)" value="hc1" />
+								<option label="hc2 (Long & Ervin)" value="hc2" />
+								<option label="hc4 (Cribari-Neto)" value="hc4" />
+							</dropdown>
+						</frame>
+						<frame id="frm_clSSSSRRRR">
+							<column id="clm_chckbxdcSS">
+								<checkbox id="chc_Shwsmsfs" label="Show sums of squares, raw likelihood ratios etc." value="true" />
+							</column>
+							<column id="clm_chckbxdcRR">
+								<checkbox id="chc_Rtrnvbjc" label="Return 'aov' object" value="true" checked="true" />
+							</column>
+						</frame>
+						<stretch />
+						<checkbox id="chc_Spprsspc" label="Suppress package loading messages" value="true" checked="true" />
+						<saveobject label="Save results to workspace" checkable="true" initial="anova.results" id="svb_Svrsltst" />
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.js
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.js	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,99 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+	echo("require(sciplot)\n");
+}
+
+function calculate(){
+}
+
+function printout(){
+	// all the real work is moved to a custom defined function doPrintout() below
+	// true in this case means: We want all the headers that should be printed in the output:
+	doPrintout(true);
+}
+
+function preview(){
+	preprocess();
+	calculate();
+	doPrintout(false);
+}
+
+function doPrintout(full){
+	// read in variables from dialog
+	var vrslFactrxxs = getValue("vrsl_Factrxxs");
+	var vrslRspnsvct = getValue("vrsl_Rspnsvct");
+	var vrslGrpngfct = getValue("vrsl_Grpngfct");
+	var radPlottype = getValue("rad_Plottype");
+	var chcStndrdrr = getValue("chc_Stndrdrr");
+	var chcLegend = getValue("chc_Legend");
+	var radElements = getValue("rad_Elements");
+	var radBars = getValue("rad_Bars");
+	var inpLegndlbl = getValue("inp_Legndlbl");
+
+	// create the plot
+	if(full) {
+		echo("rk.header(\"Interaction plot\")\n");
+	}
+
+	// in case there are generic plot options defined:
+	var embGnrcpltpCodePreprocess = getValue("emb_Gnrcpltp.code.preprocess");
+	var embGnrcpltpCodePrintout = getValue("emb_Gnrcpltp.code.printout");
+	var embGnrcpltpCodeCalculate = getValue("emb_Gnrcpltp.code.calculate");
+
+	if(full) {
+		echo("rk.graph.on()\n");
+	}
+	echo("\ttry({\n");
+
+	// insert any option-setting code that should be run before the actual plotting commands:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodePreprocess, "\n", "");
+
+	// the actual plot:
+	if(radPlottype == "line") {
+		echo("\t\tlineplot.CI(");
+	} else {
+		echo("\t\tbargraph.CI(");
+	}
+	if(vrslFactrxxs) {
+		echo("\n\t\t\tx.factor=" + vrslFactrxxs);
+	}
+	if(vrslRspnsvct) {
+		echo(",\n\t\t\tresponse=" + vrslRspnsvct);
+	}
+	if(vrslGrpngfct) {
+		echo(",\n\t\t\tgroup=" + vrslGrpngfct);
+	}
+	if(radPlottype == "line" & radElements != "b") {
+		echo(",\n\t\t\ttype=\"" + radElements + "\"");
+	}
+	if(radPlottype == "bar" & radBars == "split") {
+		echo(",\n\t\t\tsplit=TRUE");
+	}
+	if(radPlottype == "line" & !chcLegend & vrslGrpngfct != "") {
+		echo(",\n\t\t\tlegend=FALSE");
+	}
+	if(radPlottype == "bar" & chcLegend == "true" & vrslGrpngfct != "") {
+		echo(",\n\t\t\tlegend=TRUE");
+	}
+	if(chcLegend == "true" & vrslGrpngfct != "" & inpLegndlbl != "") {
+		echo(",\n\t\t\ttrace.label=\"" + inpLegndlbl + "\"");
+	}
+	if(!chcStndrdrr) {
+		echo(",\n\t\t\tci.fun=function(x)c(mean(x, na.rm=TRUE), mean(x, na.rm=TRUE))");
+	}
+	echo(embGnrcpltpCodePrintout.replace(/, /g, ",\n\t\t\t"));
+	echo(")");
+
+	// insert any option-setting code that should be run after the actual plot:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodeCalculate, "\n", "");
+
+	echo("\n\t})\n");
+	if(full) {
+		echo("rk.graph.off()\n");
+	}
+}
\ No newline at end of file

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.xml
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.xml	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Interactionplot.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,61 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="Interactionplot.js" />
+	<help file="Interactionplot.rkh" />
+	<logic>
+		<convert id="lgc_rdPlttyp" sources="rad_Plottype.string" mode="equals" standard="line" />
+		<connect governor="lgc_rdPlttyp" client="rad_Elements.visible" />
+		<connect governor="lgc_rdPlttyp.not" client="rad_Bars.visible" />
+		<convert id="lgc_vrslGrpn" sources="vrsl_Grpngfct.available" mode="notequals" />
+		<connect governor="lgc_vrslGrpn" client="rad_Bars.enabled" />
+		<connect governor="lgc_vrslGrpn" client="chc_Legend.enabled" />
+		<convert id="lgc_lgcvrsGL" sources="lgc_vrslGrpn;chc_Legend.state" mode="and" />
+		<connect governor="lgc_lgcvrsGL" client="inp_Legndlbl.enabled" />
+		<connect governor="vrsl_Factrxxs.available" client="emb_Gnrcpltp.xvar" />
+		<connect governor="vrsl_Rspnsvct.available" client="emb_Gnrcpltp.yvar" />
+		<set id="emb_Gnrcpltp.allow_type" to="false" />
+	</logic>
+	<dialog label="Interaction plot">
+		<row id="row_vSSDDFFSRR">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_fDDFFSRRSG">
+				<frame label="Data" id="frm_Data">
+					<varslot id="vrsl_Factrxxs" label="Factor (x axis)" source="vrs_Selectdt" required="true" />
+					<varslot id="vrsl_Rspnsvct" label="Response vector" source="vrs_Selectdt" required="true" />
+					<varslot id="vrsl_Grpngfct" label="Grouping factor (traces)" source="vrs_Selectdt" />
+				</frame>
+				<stretch />
+				<frame id="frm_rPPLBSSLLP">
+					<row id="row_cPPLBSSLLP">
+						<column id="clm_rdPPLBSSLL">
+							<radio id="rad_Plottype" label="Plot type">
+								<option label="Lineplot" value="line" checked="true" />
+								<option label="Bargraph" value="bar" />
+							</radio>
+							<checkbox id="chc_Stndrdrr" label="Standard error" value="true" checked="true" />
+							<checkbox id="chc_Legend" label="Legend" value="true" checked="true" />
+							<stretch />
+						</column>
+						<column id="clm_rEELLPBBGS">
+							<radio id="rad_Elements" label="Elements">
+								<option label="Lines + points" value="b" checked="true" />
+								<option label="Lines only" value="l" />
+								<option label="Points only" value="p" />
+							</radio>
+							<radio id="rad_Bars" label="Bars">
+								<option label="Group bars" value="group" checked="true" />
+								<option label="Split bars" value="split" />
+							</radio>
+							<stretch />
+						</column>
+					</row>
+					<input label="Legend label" id="inp_Legndlbl" />
+					<embed component="rkward::plot_options" as_button="true" label="Generic plot options" id="emb_Gnrcpltp" />
+					<preview />
+				</frame>
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.js
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.js	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,65 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+
+}
+
+function calculate(){
+	// read in variables from dialog
+	var radDatafrmt = getValue("rad_Datafrmt");
+	var vrslRspnsvct = getValue("vrsl_Rspnsvct");
+	var vrslGrpngvct = getValue("vrsl_Grpngvct");
+	var vrslSprtrsp3 = getValue("vrsl_Sprtrsp3");
+	var drpMthdfrdj = getValue("drp_Mthdfrdj");
+	var chcPldSDfrl = getValue("chc_PldSDfrl");
+	var chcPrdtTsts = getValue("chc_PrdtTsts");
+	var radAltrntvh = getValue("rad_Altrntvh");
+
+	// the R code to be evaluated
+	if(radDatafrmt == "one") {
+		echo("\tpair.t.results <- pairwise.t.test(\n\t\t");
+		if(vrslRspnsvct) {
+			echo("x=" + vrslRspnsvct);
+		}
+		if(vrslGrpngvct) {
+			echo(",\n\t\tg=" + vrslGrpngvct);
+		}
+	} else {
+		var vrslSprtrsp3 = getValue("vrsl_Sprtrsp3").split("\n").join(", ");
+		echo("\t# simple helper function to get the names of the objects\n");
+		echo("\tgrouping.vector <- function(...){\n\tunlist(lapply(match.call()[-1], function(x){rep(deparse(x), length(eval(x)))}))\n}\n");
+		if(vrslSprtrsp3) {
+			echo("\t# create data and grouping vectors\n\tdata <- c(" + vrslSprtrsp3 + ")\n\tgroup <- grouping.vector(" + vrslSprtrsp3 + ")\n\n");
+		}
+		echo("\t# the actual pairwise t-tests, using the prepared data\n\tpair.t.results <- pairwise.t.test(\n\t\t");
+		if(vrslSprtrsp3) {
+			echo("x=data,\n\t\tg=group");
+		}
+	}
+	if(drpMthdfrdj) {
+		echo(",\n\t\tp.adjust.method=\"" + drpMthdfrdj + "\"");
+	} else {}
+	if(chcPldSDfrl) {
+		echo(",\n\t\tpool.sd=TRUE");
+	} else {}
+	if(chcPrdtTsts) {
+		echo(",\n\t\tpaired=TRUE");
+	} else {}
+	if(radAltrntvh != "two.sided") {
+		echo(",\n\t\talternative=\"" + radAltrntvh + "\"");
+	} else {}
+	echo(")\n\n");
+}
+
+function printout(){
+	// printout the results
+	echo("rk.header(\"Pairwise t-Tests results\")\n");
+
+	echo("rk.print(pair.t.results)\n");
+
+}
+

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.xml
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.xml	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/PairwisetTests.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,56 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="PairwisetTests.js" />
+	<help file="PairwisetTests.rkh" />
+	<logic>
+		<convert id="lgc_chcPldSD" sources="chc_PldSDfrl.state" mode="equals" standard="true" />
+		<connect governor="lgc_chcPldSD.not" client="chc_PrdtTsts.enabled" />
+		<convert id="lgc_chcPrdtT" sources="chc_PrdtTsts.state" mode="equals" standard="true" />
+		<connect governor="lgc_chcPrdtT.not" client="chc_PldSDfrl.enabled" />
+		<convert id="lgc_rdDtfrmt" sources="rad_Datafrmt.string" mode="equals" standard="one" />
+		<connect governor="lgc_rdDtfrmt" client="vrsl_Rspnsvct.visible" />
+		<connect governor="lgc_rdDtfrmt" client="vrsl_Rspnsvct.required" />
+		<connect governor="lgc_rdDtfrmt" client="vrsl_Grpngvct.visible" />
+		<connect governor="lgc_rdDtfrmt" client="vrsl_Grpngvct.required" />
+		<connect governor="lgc_rdDtfrmt.not" client="vrsl_Sprtrsp3.visible" />
+		<connect governor="lgc_rdDtfrmt.not" client="vrsl_Sprtrsp3.required" />
+	</logic>
+	<dialog label="Pairwise t-Tests">
+		<row id="row_vSSDDSSDDR">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_rDDSSDDRRS">
+				<radio id="rad_Datafrmt" label="Data format">
+					<option label="Single (grouped) vector" value="one" checked="true" />
+					<option label="Separate variables" value="group" />
+				</radio>
+				<frame label="Data" id="frm_Data">
+					<varslot id="vrsl_Rspnsvct" label="Response vector" source="vrs_Selectdt" />
+					<varslot id="vrsl_Grpngvct" label="Grouping vector or factor" source="vrs_Selectdt" />
+					<varslot id="vrsl_Sprtrsp3" label="Separate response vectors (>= 3)" source="vrs_Selectdt" multi="true" min_vars="3" />
+				</frame>
+				<frame label="Alpha error correction" id="frm_Alphrrrc">
+					<dropdown id="drp_Mthdfrdj" label="Method for adjusting p values">
+						<option label="none" value="none" />
+						<option label="Bonferroni" value="bonferroni" />
+						<option label="Holm" value="holm" checked="true" />
+						<option label="Benjamini & Hochberg (fdr)" value="BH" />
+						<option label="Benjamini & Yekutieli" value="BY" />
+						<option label="Hochberg" value="hochberg" />
+						<option label="Hommel" value="hommel" />
+					</dropdown>
+				</frame>
+				<frame id="frm_cPSDPSDPTP">
+					<checkbox id="chc_PldSDfrl" label="Pooled SD for all groups" value="true" />
+					<checkbox id="chc_PrdtTsts" label="Paired t-Tests" value="true" checked="true" />
+				</frame>
+				<radio id="rad_Altrntvh" label="Alternative hypothesis">
+					<option label="Two-sided" value="two.sided" />
+					<option label="First is greater" value="greater" />
+					<option label="Second is greater" value="less" />
+				</radio>
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.js
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.js	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,84 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+
+}
+
+function calculate(){
+	// read in variables from dialog
+	var vrslSlctllvr = getValue("vrsl_Slctllvr");
+	var vrslDpndntrs = getValue("vrsl_Dpndntrs");
+	var inpNmfrdpnd = getValue("inp_Nmfrdpnd");
+	var inpNmfrxprm = getValue("inp_Nmfrxprm");
+	var chcAtmtccss = getValue("chc_Atmtccss");
+	var inpNmfrcssb = getValue("inp_Nmfrcssb");
+	var vrslCssbjctd = getValue("vrsl_Cssbjctd");
+	var vrslBtwnsbjc = getValue("vrsl_Btwnsbjc");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+
+	// the R code to be evaluated
+	var vrslDpndntrsShortname = getValue("vrsl_Dpndntrs.shortname").split("\n").join("\", \"");
+	var vrslDpndntrs = getValue("vrsl_Dpndntrs").split("\n").join(",\n\t\t\t");
+	var vrslCssbjctdShortname = getValue("vrsl_Cssbjctd.shortname");
+	var vrslBtwnsbjcShortname = getValue("vrsl_Btwnsbjc.shortname");
+	var lngVrslBtwnsbjc = getValue("vrsl_Btwnsbjc").split("\n").join(",\n\t\t\t");
+	if(vrslSlctllvr) {
+		echo("\tnum.cases <- nrow(" + vrslSlctllvr + ")\n");
+	} else {
+		echo("\tnum.cases <- unique(sapply(list(\n\t\t\t" + vrslDpndntrs);
+		if(!chcAtmtccss && vrslCssbjctd) {
+			echo(",\n\t\t\t" + vrslCssbjctd);
+		}
+		if(vrslBtwnsbjc) {
+			echo(",\n\t\t\t" + lngVrslBtwnsbjc);
+		}
+		echo("),\n\t\tlength))\n\tif(length(num.cases) > 1) {" + "\n\t\tstop(simpleError(\"Can't determine number of cases, variables don't have equal length!\"))" + "\n\t}\n");
+	}
+	if(vrslDpndntrs) {
+		echo("\tanova.conditions <- c(\"" + vrslDpndntrsShortname + "\")\n\tnum.conditions <- length(anova.conditions)\n\n");
+	} else {}
+	if(vrslBtwnsbjc) {
+		var betweenVarsNames = vrslBtwnsbjcShortname.split("\n");
+	var betweenVars = vrslBtwnsbjc.split("\n");
+	} else {
+		var betweenVars = "";
+	}
+	echo("\tanova.data <- data.frame(");
+	if(vrslDpndntrs) {
+		echo("\n\t\t" + inpNmfrdpnd + "=c(\n\t\t\t" + vrslDpndntrs + ")" + ",\n\t\t" + inpNmfrxprm + "=factor(rep(anova.conditions, each=num.cases))");
+	} else {}
+	if(chcAtmtccss && inpNmfrcssb) {
+		echo(",\n\t\t" + inpNmfrcssb + "=factor(rep(1:num.cases, times=num.conditions))");
+	} else {}
+	if(!chcAtmtccss && vrslCssbjctd) {
+		echo(",\n\t\t" + vrslCssbjctdShortname + "=factor(rep(" + vrslCssbjctd + ", times=num.conditions))");
+	} else {}
+	if(vrslBtwnsbjc) {
+		for (var i=0, len=betweenVarsNames.length; i<len; ++i ){
+			echo(",\n\t\t" + betweenVarsNames[i] + "=factor(rep(" + betweenVars[i] + ", times=num.conditions))");
+		}
+	} else {}
+	echo(",\n\t\tstringsAsFactors=FALSE)\n\n");
+}
+
+function printout(){
+	// printout the results
+	echo("rk.header(\"Prepare within subject data results\")\n");
+
+
+	//// save result object
+	// read in saveobject variables
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var svbSvrsltstActive = getValue("svb_Svrsltst.active");
+	var svbSvrsltstParent = getValue("svb_Svrsltst.parent");
+	// assign object to chosen environment
+	if(svbSvrsltstActive) {
+		echo(".GlobalEnv$" + svbSvrsltst + " <- anova.data\n");
+	}
+
+}
+

Added: branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.xml
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.xml	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/plugins/Preparewithinsubjectdata.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,29 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="Preparewithinsubjectdata.js" />
+	<help file="Preparewithinsubjectdata.rkh" />
+	<logic>
+		<connect governor="current_object" client="vrsl_Slctllvr.available" />
+		<connect governor="vrsl_Slctllvr.available" client="vrs_Selectdt.root" />
+		<connect governor="chc_Atmtccss.state" client="inp_Nmfrcssb.visible" />
+		<connect governor="chc_Atmtccss.state.not" client="vrsl_Cssbjctd.visible" />
+	</logic>
+	<dialog label="Prepare within subject data">
+		<row id="row_vSSSSSDDS2">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_vSSSDDS2NN">
+				<varslot id="vrsl_Slctllvr" label="Select all variables from one data.frame" source="vrs_Selectdt" classes="data.frame" />
+				<varslot id="vrsl_Dpndntrs" label="Dependent/response vectors" source="vrs_Selectdt" required="true" multi="true" min_vars="2" />
+				<input label="Name for dependent variable" id="inp_Nmfrdpnd" initial="response" required="true" />
+				<input label="Name for experimental condition" id="inp_Nmfrxprm" initial="condition" required="true" />
+				<checkbox id="chc_Atmtccss" label="Automatic case/subject identifier" value="true" checked="true" />
+				<input label="Name for case/subject identifier" id="inp_Nmfrcssb" initial="case" required="true" />
+				<varslot id="vrsl_Cssbjctd" label="Case/subject identifier" source="vrs_Selectdt" required="true" />
+				<varslot id="vrsl_Btwnsbjc" label="Between subject variables" source="vrs_Selectdt" multi="true" />
+				<saveobject label="Save results to workspace" checkable="true" checked="true" initial="anova.data" id="svb_Svrsltst" />
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ANOVA/inst/rkward/rk.ANOVA.pluginmap
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/rk.ANOVA.pluginmap	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/rk.ANOVA.pluginmap	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,119 @@
+<!DOCTYPE rkpluginmap>
+<document 
+	namespace="rkward"
+	id="ANOVA_rkward"
+>
+	<!-- 
+		this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! 
+	-->
+	<about 
+		name="rk.ANOVA"
+		shortinfo="RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions."
+		longinfo="RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions."
+		version="0.01-13"
+		releasedate="2012-09-29"
+		url="http://rkward.sf.net"
+		license="GPL (>= 3)"
+	>
+		<author 
+			given="Meik"
+			family="Michalke"
+			email="meik.michalke at hhu.de"
+			role="aut, cre"
+		 />
+		<dependencies rkward_min_version="0.5.6">
+			<package name="ez" />
+			<package name="sciplot" />
+			<!-- 
+				If this plugin depends on other pluginmaps, edit this part to your needs: 				<pluginmap 
+								name="CHANGE_ME_OR_DELETE_ME"
+								url="CHANGE_ME_OR_DELETE_ME"
+							 /> 
+			-->
+		</dependencies>
+	</about>
+	<!-- 
+		<require file="path/file.pluginmap" /> 
+	-->
+	<components>
+		<component 
+			id="cmp_ANOVAPairwisetTests"
+			label="Pairwise t-Tests"
+			type="standard"
+			file="plugins/PairwisetTests.xml"
+		 />
+		<component 
+			id="cmp_ANOVAInteractionplot"
+			label="Interaction plot"
+			type="standard"
+			file="plugins/Interactionplot.xml"
+		 />
+		<component 
+			id="cmp_ANOVAPreparewithinsbjctdt"
+			label="Prepare within subject data"
+			type="standard"
+			file="plugins/Preparewithinsubjectdata.xml"
+		 />
+		<component 
+			id="cmp_ANOVAANOVA"
+			label="ANOVA"
+			type="standard"
+			file="plugins/ANOVA.xml"
+		 />
+	</components>
+	<hierarchy>
+		<menu 
+			id="analysis"
+			label.analysis="Analysis"
+		>
+			<menu 
+				id="means"
+				label="means"
+			>
+				<menu 
+					id="ttests"
+					label="t-tests"
+				>
+					<entry component="cmp_ANOVAPairwisetTests" />
+				</menu>
+			</menu>
+		</menu>
+		<menu 
+			id="plots"
+			label.plots="Plots"
+		>
+			<entry component="cmp_ANOVAInteractionplot" />
+		</menu>
+		<menu 
+			id="data"
+			label.data="Data"
+		>
+			<menu 
+				id="ANOVA"
+				label="ANOVA"
+			>
+				<entry component="cmp_ANOVAPreparewithinsbjctdt" />
+			</menu>
+		</menu>
+		<menu 
+			id="analysis"
+			label.analysis="Analysis"
+		>
+			<menu 
+				id="ANOVA"
+				label="ANOVA"
+			>
+				<entry component="cmp_ANOVAANOVA" />
+			</menu>
+		</menu>
+	</hierarchy>
+	<!-- 
+		<context id="x11">
+			</context> 
+	-->
+	<!-- 
+		<context id="import">
+			</context> 
+	-->
+</document>

Added: branches/external_plugins/rk.ANOVA/inst/rkward/rkwarddev_ANOVA_plugin_script.R
===================================================================
--- branches/external_plugins/rk.ANOVA/inst/rkward/rkwarddev_ANOVA_plugin_script.R	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/inst/rkward/rkwarddev_ANOVA_plugin_script.R	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,473 @@
+# the plugin code was generated by this script
+# you should not change the plugin code directly, but this script
+# note: this script only creates objects in your workspace,
+# *EXCEPT* for the last call, see below.
+
+local({
+# set the output directory to overwrite the actual plugin
+output.dir <- tempdir()
+overwrite <- TRUE
+
+require(rkwarddev)
+
+about.info <- rk.XML.about(
+	name="rk.ANOVA",
+	author=c(
+		person(given="Meik", family="Michalke",
+			email="meik.michalke at hhu.de", role=c("aut","cre"))),
+	about=list(desc="RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions.",
+		version="0.01-13", url="http://rkward.sf.net"),
+	dependencies=list(rkward.min="0.5.6"),
+	package=list(c(name="ez"), c(name="sciplot"))
+	)
+
+############
+## ANOVA
+############
+anova.drp.design <- rk.XML.radio("Design", options=list(
+		"Between subjects"=c(val="between"),
+		"Within subjects (repeated measures)"=c(val="within", chk=TRUE),
+		"Mixed"=c(val="mixed")
+	))
+var.select <- rk.XML.varselector(label="Select data")
+var.data <- rk.XML.varslot(label="Data (must be data.frame)", source=var.select, required=TRUE, classes="data.frame")
+var.dv <- rk.XML.varslot(label="Dependent variable", source=var.select, required=TRUE)
+var.wid <- rk.XML.varslot(label="Case/subject identifier", source=var.select)
+var.within <- rk.XML.varslot(label="Within subject variables", source=var.select, multi=TRUE)
+var.between <- rk.XML.varslot(label="Between subject variables", source=var.select, multi=TRUE)
+# observed data
+var.select2 <- rk.XML.varselector(label="Select observed variables")
+var.observed <- rk.XML.varslot(label="Observed variables (not manipulated)", source=var.select2, multi=TRUE)
+
+#diff
+#reverse_diff
+drp.vtype <- rk.XML.dropdown(
+	label="Sums of squares type for unbalanced designs",
+	options=list("Type 1"=c(val=1), "Type 2"=c(val=2, chk=TRUE), "Type 3"=c(val=3)))
+
+# logic: only relevant for pure between designs
+drp.white <- rk.XML.dropdown(
+	label="Heteroscedasticity correction",
+	options=list(
+		"None"=c(val="false", chk=TRUE),
+		"hc3 (Long & Ervin; default)"=c(val="hc3"),
+		"hc0 (White)"=c(val="hc0"),
+		"hc1 (Long & Ervin)"=c(val="hc1"),
+		"hc2 (Long & Ervin)"=c(val="hc2"),
+		"hc4 (Cribari-Neto)"=c(val="hc4")))
+
+check.extrainfo <- rk.XML.cbox(label="Show sums of squares, raw likelihood ratios etc.", value="true")
+check.aov <- rk.XML.cbox(label="Return 'aov' object", value="true", chk=TRUE)
+
+var.chk.suppress <- rk.XML.cbox(label="Suppress package loading messages", value="true", chk=TRUE)
+save.results <- rk.XML.saveobj("Save results to workspace", initial="anova.results")
+
+tab1.data <- rk.XML.row(
+		var.select,
+		rk.XML.col(
+			rk.XML.frame(var.data),
+			rk.XML.frame(anova.drp.design),
+			rk.XML.frame(var.dv, var.wid),
+			rk.XML.frame(var.within, var.between)
+		)
+	)
+
+tab2.observed <- rk.XML.row(
+		var.select2,
+		rk.XML.col(
+			rk.XML.frame(rk.XML.text("Observed variables are independent variables you have <b>already defined</b> as either between or within variables, but that were measured and <b>not manipulated</b>. They affect the calculated effect size (generalized eta seqared).")),
+			rk.XML.frame(var.observed)
+		)
+	)
+
+tab3.options <- rk.XML.row(
+		rk.XML.col(
+			rk.XML.frame(drp.vtype),
+			rk.XML.frame(drp.white),
+			rk.XML.frame(rk.XML.col(check.extrainfo),rk.XML.col(check.aov)),
+			rk.XML.stretch(),
+			var.chk.suppress,
+			save.results
+		)
+	)
+
+full.dialog <- rk.XML.dialog(rk.XML.tabbook(label="ANOVA",
+		tabs=list("Data"=tab1.data, "Observed"=tab2.observed, "Options"=tab3.options)
+	), label="ANOVA")
+
+## logic section to tie the second varslot to the data.frame
+	lgc.sect <- rk.XML.logic(
+		rk.XML.connect(governor="current_object", client=var.data, set="available"),
+		rk.XML.connect(governor=var.data, client=var.select, get="available", set="root"),
+		anova.gov.data <- rk.XML.convert(sources=list(available=var.data), mode=c(notequals="")),
+		anova.gov.between <- rk.XML.convert(sources=list(string=anova.drp.design), mode=c(equals="between")),
+		anova.gov.within <- rk.XML.convert(sources=list(string=anova.drp.design), mode=c(equals="within")),
+		anova.gov.mixed <- rk.XML.convert(sources=list(string=anova.drp.design), mode=c(equals="mixed")),
+		anova.gov.show.bvars <- rk.XML.convert(sources=list(anova.gov.between, anova.gov.mixed), mode=c(or=""), id.name="lgc_bvars"),
+		anova.gov.show.wvars <- rk.XML.convert(sources=list(anova.gov.within, anova.gov.mixed), mode=c(or=""), id.name="lgc_vvars"),
+ 		rk.XML.connect(governor=anova.gov.data, client=var.dv, set="enabled"),
+ 		rk.XML.connect(governor=anova.gov.data, client=var.between, set="enabled"),
+ 		rk.XML.connect(governor=anova.gov.data, client=var.within, set="enabled"),
+ 		rk.XML.connect(governor=anova.gov.data, client=var.wid, set="enabled"),
+		rk.XML.connect(governor=anova.gov.show.wvars, client=var.wid, set="required"),
+		rk.XML.connect(governor=anova.gov.show.bvars, client=var.between, set="visible"),
+		rk.XML.connect(governor=anova.gov.show.wvars, client=var.within, set="visible"),
+		rk.XML.connect(governor=anova.gov.show.bvars, client=var.between, set="required"),
+		rk.XML.connect(governor=anova.gov.show.wvars, client=var.within, set="required"),
+		# observed data
+		rk.XML.connect(governor=anova.gov.data, client=tab2.observed, set="enabled"),
+		rk.XML.connect(governor=var.data, client=var.select2, get="available", set="root")
+	)
+
+## JavaScript
+js.calc <- rk.paste.JS(
+	jsVarDv <- rk.JS.vars(var.dv, modifiers="shortname", join=", "),
+	jsVarWid <- rk.JS.vars(var.wid, modifiers="shortname", join=", "),
+	jsVarWithin <- rk.JS.vars(var.within, modifiers="shortname", join=", "),
+	jsVarBetween <- rk.JS.vars(var.between, modifiers="shortname", join=", "),
+	jsVarObserved <- rk.JS.vars(var.observed, modifiers="shortname", join=", "),
+	ite(rkwarddev:::id(drp.vtype, " == 3"), echo("\t# set contrasts for accurate type 3 ANOVA\n\toptions(contrasts=c(\"contr.sum\",\"contr.poly\"))\n")),
+	ite(rkwarddev:::id(var.wid, " == \"\" & ", anova.drp.design, " == \"between\""), echo("\t# ezANOVA demands a subject identifier variable\n\t", var.data, " <- cbind(", var.data ,", ez.subject.ID.dummy=factor(1:nrow(", var.data ,")))\n")),
+	echo("\tanova.results <- ezANOVA("),
+	ite(var.data, echo("\n\t\tdata=", var.data)),
+	ite(var.dv, echo(",\n\t\tdv=.(", jsVarDv ,")")),
+	ite(var.wid, echo(",\n\t\twid=.(", jsVarWid ,")"), ite(rkwarddev:::id(anova.drp.design, " == \"between\""), echo(",\n\t\twid=.(ez.subject.ID.dummy)"))), # wid is needed anyway
+	ite(rkwarddev:::id(var.within, " != \"\" & ", anova.drp.design, " != \"between\""), echo(",\n\t\twithin=.(", jsVarWithin ,")")),
+	ite(rkwarddev:::id(var.between, " != \"\" & ", anova.drp.design, " != \"within\""), echo(",\n\t\tbetween=.(", jsVarBetween ,")")),
+	ite(var.observed, echo(",\n\t\tobserved=.(", jsVarObserved ,")")),
+
+	ite(rkwarddev:::id(drp.vtype, " != 2"), echo(",\n\t\ttype=", drp.vtype)),
+	ite(rkwarddev:::id(drp.white, " != \"false\""), echo(",\n\t\twhite.adjust=\"", drp.white, "\"")),
+	tf(check.extrainfo, opt="detailed"),
+	tf(check.aov, opt="return_aov"),
+	echo(")\n\n"),
+	empty.e=TRUE
+)
+
+js.print <- rk.paste.JS(
+	echo("rk.print(anova.results[[\"ANOVA\"]])\n"),
+	echo("\tif(\"Mauchly's Test for Sphericity\" %in% names(anova.results)){
+		rk.header(\"Mauchly's Test for Sphericity\", level=3)
+		rk.print(anova.results[[\"Mauchly's Test for Sphericity\"]])
+	} else {}\n"),
+	echo("\tif(\"Sphericity Corrections\" %in% names(anova.results)){
+		rk.header(\"Sphericity Corrections\", level=3)
+		rk.print(anova.results[[\"Sphericity Corrections\"]])
+	} else {}\n"),
+	echo("\tif(\"Levene's Test for Homgeneity\" %in% names(anova.results)){
+		rk.header(\"Levene's Test for Homgeneity\", level=3)
+		rk.print(anova.results[[\"Levene's Test for Homgeneity\"]])
+	} else {}\n"),
+	empty.e=TRUE
+)
+
+########
+## prepare data
+########
+pd.var.selectVars <- rk.XML.varselector(label="Select data")
+pd.var.data <- rk.XML.varslot(label="Select all variables from one data.frame", source=pd.var.selectVars, classes="data.frame")
+pd.var.dependent <- rk.XML.varslot(label="Dependent/response vectors", source=pd.var.selectVars, multi=TRUE, min=2, required=TRUE)
+pd.inp.dependent <- rk.XML.input("Name for dependent variable", initial="response", required=TRUE)
+pd.inp.condition <- rk.XML.input("Name for experimental condition", initial="condition", required=TRUE)
+pd.chk.genCaseID <- rk.XML.cbox("Automatic case/subject identifier", chk=TRUE)
+pd.inp.caseID <- rk.XML.input("Name for case/subject identifier", initial="case", required=TRUE)
+pd.var.wid <- rk.XML.varslot(label="Case/subject identifier", source=pd.var.selectVars, required=TRUE)
+pd.var.between <- rk.XML.varslot(label="Between subject variables", source=pd.var.selectVars, multi=TRUE)
+pd.save.results <- rk.XML.saveobj("Save results to workspace", initial="anova.data", chk=TRUE)
+
+pd.full.dialog <- rk.XML.dialog(rk.XML.row(
+	pd.var.selectVars,
+	rk.XML.col(
+		pd.var.data,
+		pd.var.dependent,
+		pd.inp.dependent,
+		pd.inp.condition,
+		pd.chk.genCaseID,
+		pd.inp.caseID,
+		pd.var.wid,
+		pd.var.between,
+		pd.save.results
+	)
+), label="Prepare within subject data")
+
+## logic section to tie the varslot to the data.frame
+	pd.lgc.sect <- rk.XML.logic(
+		rk.XML.connect(governor="current_object", client=pd.var.data, set="available"),
+		rk.XML.connect(governor=pd.var.data, client=pd.var.selectVars, get="available", set="root"),
+# 		pd.gov.data <- rk.XML.convert(sources=list(available=pd.var.data), mode=c(notequals="")),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.var.dependent, set="enabled"),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.inp.dependent, set="enabled"),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.inp.condition, set="enabled"),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.chk.genCaseID, set="enabled"),
+		rk.XML.connect(governor=pd.chk.genCaseID, client=pd.inp.caseID, set="visible"),
+		rk.XML.connect(governor=pd.chk.genCaseID, client=pd.var.wid, set="visible", not=TRUE)#,
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.inp.caseID, set="enabled"),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.var.wid, set="enabled"),
+# 		rk.XML.connect(governor=pd.gov.data, client=pd.var.between, set="enabled")
+	)
+
+## JavaScript
+pd.js.calc <- rk.paste.JS(
+	pd.js.dep.names <- rk.JS.vars(pd.var.dependent, modifiers="shortname", join="\\\", \\\""),
+	pd.js.dep <- rk.JS.vars(pd.var.dependent, join=",\\n\\t\\t\\t"),
+	pd.js.wid <- rk.JS.vars(pd.var.wid, modifiers="shortname"),
+	pd.js.between.short <- rk.JS.vars(pd.var.between, modifiers="shortname"),
+	pd.js.between <- rk.JS.vars(pd.var.between, join=",\\n\\t\\t\\t", var.prefix="lng"),
+	ite(pd.var.data,
+		echo("\tnum.cases <- nrow(", pd.var.data,")\n"),
+		rk.paste.JS(
+			echo("\tnum.cases <- unique(sapply(list(\n\t\t\t", pd.js.dep),
+			ite(id("!", pd.chk.genCaseID , " && ", pd.var.wid),
+				echo(",\n\t\t\t", pd.var.wid)),
+			ite(pd.var.between,
+				echo(",\n\t\t\t", pd.js.between)),
+			echo("),\n\t\tlength))\n\tif(length(num.cases) > 1) {",
+				"\n\t\tstop(simpleError(\"Can't determine number of cases, variables don't have equal length!\"))",
+				"\n\t}\n"), level=3)
+	),
+	ite(pd.var.dependent, echo("\tanova.conditions <- c(\"", pd.js.dep.names, "\")\n\tnum.conditions <- length(anova.conditions)\n\n")),
+	ite(pd.var.between,
+		rkwarddev:::id("\tvar betweenVarsNames = ", pd.js.between.short, ".split(\"\\n\");\n",
+		"\tvar betweenVars = ", pd.var.between, ".split(\"\\n\");"),
+			"\tvar betweenVars = \"\";"),
+	echo("\tanova.data <- data.frame("),
+	ite(pd.var.dependent,
+		echo("\n\t\t", pd.inp.dependent, "=c(\n\t\t\t", pd.js.dep, ")",
+		",\n\t\t", pd.inp.condition, "=factor(rep(anova.conditions, each=num.cases))")
+	),
+	ite(id(pd.chk.genCaseID , " && ", pd.inp.caseID),
+		echo(",\n\t\t", pd.inp.caseID, "=factor(rep(1:num.cases, times=num.conditions))")),
+	ite(id("!", pd.chk.genCaseID , " && ", pd.var.wid),
+		echo(",\n\t\t", pd.js.wid, "=factor(rep(", pd.var.wid, ", times=num.conditions))")),
+	ite(pd.var.between, rkwarddev:::id("\tfor (var i=0, len=betweenVarsNames.length; i<len; ++i ){\n",
+		"\t\t\techo(\",\\n\\t\\t\" + betweenVarsNames[i] + \"=factor(rep(\" + betweenVars[i] + \", times=num.conditions))\");\n",
+		"\t\t}"
+	)),
+	echo(",\n\t\tstringsAsFactors=FALSE)\n\n"),
+	empty.e=TRUE
+)
+
+## make a whole component of the data preparation
+pdata.component <- rk.plugin.component("Prepare within subject data",
+	xml=list(
+		logic=pd.lgc.sect,
+		dialog=pd.full.dialog),
+ 	js=list(
+ 		calculate=pd.js.calc),
+# 		printout=pd.js.print),
+	hierarchy=list("data", "ANOVA"),
+	create=c("xml", "js"))
+
+########
+## pairwise t-tests
+########
+pt.var.selectVars <- rk.XML.varselector(label="Select data")
+pt.data.format <- rk.XML.radio(
+	label="Data format",
+	options=list(
+		"Single (grouped) vector"=c(val="one", chk=TRUE),
+		"Separate variables"=c(val="group")
+	))
+pt.tvar.data <- rk.XML.varslot(label="Response vector", source=pt.var.selectVars)
+pt.tvar.group <- rk.XML.varslot(label="Grouping vector or factor", source=pt.var.selectVars)
+pt.tvar.several <- rk.XML.varslot(label="Separate response vectors (>= 3)", source=pt.var.selectVars, multi=TRUE, min=3)
+pt.drp.adjust <- rk.XML.dropdown(
+	label="Method for adjusting p values",
+	options=list(
+		"none"=c(val="none"),
+		"Bonferroni"=c(val="bonferroni"), 
+		"Holm"=c(val="holm", chk=TRUE),
+		"Benjamini & Hochberg (fdr)"=c(val="BH"),
+		"Benjamini & Yekutieli"=c(val="BY"),
+		"Hochberg"=c(val="hochberg"),
+		"Hommel"=c(val="hommel")
+	))
+pt.chk.poolSD <- rk.XML.cbox("Pooled SD for all groups", value="true")
+pt.chk.paired <- rk.XML.cbox("Paired t-Tests", value="true", chk=TRUE)
+pt.radio.altern <- rk.XML.radio("Alternative hypothesis",
+		options=list(
+			"Two-sided"=c(val="two.sided"),
+			"First is greater"=c(val="greater"),
+			"Second is greater"=c(val="less")
+		)
+	)
+pt.full.dialog <- rk.XML.dialog(
+	rk.XML.row(
+		pt.var.selectVars,
+		rk.XML.col(
+			pt.data.format,
+			rk.XML.frame(pt.tvar.data, pt.tvar.group, pt.tvar.several, label="Data"),
+			rk.XML.frame(pt.drp.adjust, label="Alpha error correction"),
+			rk.XML.frame(pt.chk.poolSD, pt.chk.paired),
+			pt.radio.altern
+		)
+	), label="Pairwise t-Tests")
+
+## logic
+pt.lgc.sect <- rk.XML.logic(
+  		pt.gov.pool <- rk.XML.convert(sources=list(state=pt.chk.poolSD), mode=c(equals="true")),
+  		rk.XML.connect(governor=pt.gov.pool, client=pt.chk.paired, set="enabled", not=TRUE),
+		pt.gov.pair <- rk.XML.convert(sources=list(state=pt.chk.paired), mode=c(equals="true")),
+		rk.XML.connect(governor=pt.gov.pair, client=pt.chk.poolSD, set="enabled", not=TRUE),
+		pt.gov.onevar <- rk.XML.convert(sources=list(string=pt.data.format), mode=c(equals="one")),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.data, set="visible"),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.data, set="required"),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.group, set="visible"),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.group, set="required"),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.several, set="visible", not=TRUE),
+		rk.XML.connect(governor=pt.gov.onevar, client=pt.tvar.several, set="required", not=TRUE)
+	)
+
+## JavaScript
+pt.js.calc <- rk.paste.JS(
+	ite(rkwarddev:::id(pt.data.format, " == \"one\""),
+		rk.paste.JS(
+			echo("\tpair.t.results <- pairwise.t.test(\n\t\t"),
+			ite(pt.tvar.data, echo("x=", pt.tvar.data)),
+			ite(pt.tvar.group, echo(",\n\t\tg=", pt.tvar.group)), level=3),
+		rk.paste.JS(
+			pt.vars.to.group <- rk.JS.vars(pt.tvar.several, join=", "),
+			echo("\t# simple helper function to get the names of the objects\n"),
+			echo("\tgrouping.vector <- function(...){\n\tunlist(lapply(match.call()[-1], function(x){rep(deparse(x), length(eval(x)))}))\n}\n"),
+			ite(pt.tvar.several, echo("\t# create data and grouping vectors\n\tdata <- c(", pt.vars.to.group, ")\n\tgroup <- grouping.vector(", pt.vars.to.group, ")\n\n")),
+			echo("\t# the actual pairwise t-tests, using the prepared data\n\tpair.t.results <- pairwise.t.test(\n\t\t"),
+			ite(pt.tvar.several, echo("x=data,\n\t\tg=group")), level=3
+	)),
+	ite(pt.drp.adjust, echo(",\n\t\tp.adjust.method=\"", pt.drp.adjust, "\"")),
+	tf(pt.chk.poolSD, opt="pool.sd"),
+	tf(pt.chk.paired, opt="paired"),
+	ite(rkwarddev:::id(pt.radio.altern, " != \"two.sided\""), echo(",\n\t\talternative=\"", pt.radio.altern, "\"")),
+	echo(")\n\n"),
+	empty.e=TRUE
+)
+
+pt.js.print <- rk.paste.JS(
+	echo("rk.print(pair.t.results)\n"),
+	empty.e=TRUE
+)
+
+## make a whole component of the t-test
+pttest.component <- rk.plugin.component("Pairwise t-Tests",
+	xml=list(
+		logic=pt.lgc.sect,
+		dialog=pt.full.dialog),
+	js=list(
+		calculate=pt.js.calc,
+		printout=pt.js.print),
+	hierarchy=list("analysis", "means", "t-tests"),
+	create=c("xml", "js"))
+
+###########
+## interaction plot
+###########
+ip.var.selectVars <- rk.XML.varselector(label="Select data")
+ip.tvar.x <- rk.XML.varslot(label="Factor (x axis)", source=ip.var.selectVars, required=TRUE)
+ip.tvar.response <- rk.XML.varslot(label="Response vector", source=ip.var.selectVars, required=TRUE)
+ip.tvar.group <- rk.XML.varslot(label="Grouping factor (traces)", source=ip.var.selectVars)
+ip.rad.plottype <- rk.XML.radio("Plot type", options=list(
+	"Lineplot"=c(val="line", chk=TRUE),
+	"Bargraph"=c(val="bar")))
+ip.rad.ltype <- rk.XML.radio("Elements", options=list(
+	"Lines + points"=c(val="b", chk=TRUE),
+	"Lines only"=c(val="l"),
+	"Points only"=c(val="p")))
+ip.rad.btype <- rk.XML.radio("Bars", options=list(
+	"Group bars"=c(val="group", chk=TRUE),
+	"Split bars"=c(val="split")))
+ip.chk.se <- rk.XML.cbox("Standard error", val="true", chk=TRUE)
+ip.chk.legend <- rk.XML.cbox("Legend", val="true", chk=TRUE)
+ip.inp.trace.label <- rk.XML.input("Legend label")
+ip.plot.options <- rk.XML.embed(component="rkward::plot_options", button=TRUE, label="Generic plot options")
+ip.preview <- rk.XML.preview()
+
+## logic
+ip.lgc.sect <- rk.XML.logic(
+  		ip.gov.lineplot <- rk.XML.convert(sources=list(string=ip.rad.plottype), mode=c(equals="line")),
+  		rk.XML.connect(governor=ip.gov.lineplot, client=ip.rad.ltype, set="visible"),
+		rk.XML.connect(governor=ip.gov.lineplot, client=ip.rad.btype, set="visible", not=TRUE),
+  		ip.gov.traces <- rk.XML.convert(sources=list(available=ip.tvar.group), mode=c(notequals="")),
+		rk.XML.connect(governor=ip.gov.traces, client=ip.rad.btype, set="enabled"),
+		rk.XML.connect(governor=ip.gov.traces, client=ip.chk.legend, set="enabled"),
+  		ip.gov.leglabel <- rk.XML.convert(sources=list(ip.gov.traces, state=ip.chk.legend), mode=c(and="")),
+		rk.XML.connect(governor=ip.gov.leglabel, client=ip.inp.trace.label, set="enabled"),
+		rk.XML.connect(governor=ip.tvar.x, client=ip.plot.options, get="available", set="xvar"),
+		rk.XML.connect(governor=ip.tvar.response, client=ip.plot.options, get="available", set="yvar"),
+		rk.XML.set(ip.plot.options, set="allow_type", to=FALSE)
+	)
+
+ip.full.dialog <- rk.XML.dialog(
+	rk.XML.row(
+		ip.var.selectVars,
+		rk.XML.col(
+			rk.XML.frame(ip.tvar.x, ip.tvar.response, ip.tvar.group, label="Data"),
+			rk.XML.stretch(),
+			rk.XML.frame(
+				rk.XML.row(
+					rk.XML.col(ip.rad.plottype, ip.chk.se, ip.chk.legend, rk.XML.stretch()),
+					rk.XML.col(ip.rad.ltype, ip.rad.btype, rk.XML.stretch())
+				),
+				ip.inp.trace.label,
+				ip.plot.options,
+				ip.preview)
+		)
+	), label="Interaction plot")
+
+## JavaScript
+js.po.printout <- rk.JS.vars(ip.plot.options, modifiers="code.printout", check.modifiers=FALSE)
+ip.js.prnt <- 	rk.paste.JS.graph(
+	ite(rkwarddev:::id(ip.rad.plottype, " == \"line\""),
+		echo("\t\tlineplot.CI("),
+		echo("\t\tbargraph.CI(")),
+	ite(ip.tvar.x, echo("\n\t\t\tx.factor=", ip.tvar.x)),
+	ite(ip.tvar.response, echo(",\n\t\t\tresponse=", ip.tvar.response)),
+	ite(ip.tvar.group, echo(",\n\t\t\tgroup=", ip.tvar.group)),
+	ite(rkwarddev:::id(ip.rad.plottype, " == \"line\" & ", ip.rad.ltype, " != \"b\""), echo(",\n\t\t\ttype=\"", ip.rad.ltype, "\"")),
+	ite(rkwarddev:::id(ip.rad.plottype, " == \"bar\" & ", ip.rad.btype, " == \"split\""), echo(",\n\t\t\tsplit=TRUE")),
+	ite(rkwarddev:::id(ip.rad.plottype, " == \"line\" & !", ip.chk.legend, " & ", ip.tvar.group, " != \"\""), echo(",\n\t\t\tlegend=FALSE")),
+	ite(rkwarddev:::id(ip.rad.plottype, " == \"bar\" & ", ip.chk.legend, " == \"true\" & ", ip.tvar.group, " != \"\""), echo(",\n\t\t\tlegend=TRUE")),
+	ite(rkwarddev:::id(ip.chk.legend, " == \"true\" & ", ip.tvar.group, " != \"\" & ", ip.inp.trace.label, " != \"\""), echo(",\n\t\t\ttrace.label=\"", ip.inp.trace.label, "\"")),
+	ite(rkwarddev:::id("!", ip.chk.se), echo(",\n\t\t\tci.fun=function(x)c(mean(x, na.rm=TRUE), mean(x, na.rm=TRUE))")),
+	id("echo(", js.po.printout, ".replace(/, /g, \",\\n\\t\\t\\t\"));"),
+	echo(")"),
+	plotOpts=ip.plot.options,
+	printoutObj=js.po.printout
+)
+
+## make a whole component of the interaction plot
+plot.component <- rk.plugin.component("Interaction plot",
+	xml=list(
+		logic=ip.lgc.sect,
+		dialog=ip.full.dialog),
+ 	js=list(
+		results.header="\"Interaction plot\"",
+		require="sciplot",
+ 		doPrintout=ip.js.prnt),
+	hierarchy=list("plots"),
+	create=c("xml", "js"))
+
+
+#############
+## if you run the following function call, files will be written to tempdir!
+#############
+# this is where it get's serious, that is, here all of the above is put together into one plugin
+
+rk.ANOVA.dir <<- rk.plugin.skeleton(
+	about.info,
+	path=output.dir,
+	xml=list(
+		logic=lgc.sect,
+		dialog=full.dialog),
+	js=list(
+		require="ez",
+		calculate=js.calc,
+		printout=js.print,
+		load.silencer=var.chk.suppress),
+	pluginmap=list(name="ANOVA", hierarchy=list("analysis", "ANOVA")),
+	components=list(pttest.component, plot.component, pdata.component),
+	create=c("pmap", "xml", "js", "desc"),
+	overwrite=overwrite,
+	tests=FALSE,
+#	edit=TRUE,
+	load=TRUE)#,
+#	show=TRUE)
+})

Added: branches/external_plugins/rk.ANOVA/man/rk.ANOVA-package.Rd
===================================================================
--- branches/external_plugins/rk.ANOVA/man/rk.ANOVA-package.Rd	                        (rev 0)
+++ branches/external_plugins/rk.ANOVA/man/rk.ANOVA-package.Rd	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,24 @@
+\docType{package}
+\name{rk.ANOVA-package}
+\alias{rk.ANOVA}
+\alias{rk.ANOVA-package}
+\title{RKWard GUI to conduct ANOVAs (using the ez package), pairwise t-Tests and plot interactions..}
+\description{
+  RKWard GUI to conduct ANOVAs (using the ez package),
+  pairwise t-Tests and plot interactions..
+}
+\details{
+  \tabular{ll}{ Package: \tab rk.ANOVA\cr Type: \tab
+  Package\cr Version: \tab 0.01-13\cr Date: \tab
+  2012-09-29\cr Depends: \tab rkward (>= 0.5.6)\cr
+  Enhances: \tab rkward\cr License: \tab GPL (>= 3)\cr
+  LazyLoad: \tab yes\cr URL: \tab http://rkward.sf.net\cr }
+
+  RKWard GUI to conduct ANOVAs (using the ez package),
+  pairwise t-Tests and plot interactions.
+}
+\author{
+  Meik Michalke \email{meik.michalke at hhu.de}
+}
+\keyword{package}
+

Added: branches/external_plugins/rk.ClusterAnalysis/ChangeLog
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/ChangeLog	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/ChangeLog	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,10 @@
+ChangeLog for package rk.ClusterAnalysis
+
+changes in version 0.01-7 (2012-09-29)
+fixed:
+  - added generic pre/post plot options
+
+changes in version 0.01-6 (2012-04-06)
+changes:
+  - added a ChangeLog file
+  - rebuild package for R 2.15

Added: branches/external_plugins/rk.ClusterAnalysis/DESCRIPTION
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/DESCRIPTION	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/DESCRIPTION	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,22 @@
+Package: rk.ClusterAnalysis
+Type: Package
+Title: RKWard GUI to conduct k-means, model based and hierarchical cluster
+    analyses
+Version: 0.01-7
+Date: 2012-09-29
+Author: Meik Michalke <meik.michalke at hhu.de>
+Maintainer: Meik Michalke <meik.michalke at hhu.de>
+Depends:
+    rkward (>= 0.5.6)
+Suggests:
+    mclust
+Enhances: rkward
+Description: RKWard GUI to conduct k-means, model based and hierarchical
+    cluster analyses
+License: GPL (>= 3)
+LazyLoad: yes
+URL: http://rkward.sf.net
+Authors at R: person(given="Meik", family="Michalke",
+    email="meik.michalke at hhu.de", role=c("aut", "cre"))
+Collate:
+    'rk.ClusterAnalysis-package.R'

Added: branches/external_plugins/rk.ClusterAnalysis/NAMESPACE
===================================================================
Added: branches/external_plugins/rk.ClusterAnalysis/R/rk.ClusterAnalysis-package.R
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/R/rk.ClusterAnalysis-package.R	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/R/rk.ClusterAnalysis-package.R	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,23 @@
+#' RKWard GUI to conduct k-means, model based and hierarchical cluster analyses.
+#'
+#' \tabular{ll}{
+#' Package: \tab rk.ClusterAnalysis\cr
+#' Type: \tab Package\cr
+#' Version: \tab 0.01-7\cr
+#' Date: \tab 2012-09-29\cr
+#' Depends: \tab  rkward (>= 0.5.6)\cr
+#' Enhances: \tab rkward\cr
+#' License: \tab GPL (>= 3)\cr
+#' LazyLoad: \tab yes\cr
+#' URL: \tab http://rkward.sf.net\cr
+#' }
+#'
+#' RKWard GUI to conduct k-means, model based and hierarchical cluster analyses
+#'
+#' @aliases rk.ClusterAnalysis-package rk.ClusterAnalysis
+#' @name rk.ClusterAnalysis-package
+#' @docType package
+#' @title RKWard GUI to conduct k-means, model based and hierarchical cluster analyses.
+#' @author Meik Michalke \email{meik.michalke@@hhu.de}
+#' @keywords package
+NULL

Added: branches/external_plugins/rk.ClusterAnalysis/inst/CITATION
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/CITATION	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/CITATION	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,14 @@
+bibentry("Manual",
+		title="rk.ClusterAnalysis: RKWard GUI to conduct k-means, model based and hierarchical cluster analyses",
+		author="Meik Michalke",
+		year="2012",
+		note="(Version 0.01-7)",
+		url="http://rkward.sf.net",
+
+		textVersion =
+		paste("Michalke, M. (2012). ",
+				"rk.ClusterAnalysis: RKWard GUI to conduct k-means, model based and hierarchical cluster analyses (Version 0.01-7). ",
+				"Available from http://rkward.sf.net",
+				sep=""),
+
+		mheader = "To cite rk.ClusterAnalysis in publications use:")

Added: branches/external_plugins/rk.ClusterAnalysis/inst/NEWS.Rd
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/NEWS.Rd	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/NEWS.Rd	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,17 @@
+\name{NEWS}
+\title{News for Package 'rk.ClusterAnalysis'}
+\section{Changes in rk.ClusterAnalysis version 0.01-7 (2012-09-29)}{
+  \subsection{fixed}{
+    \itemize{
+      \item added generic pre/post plot options
+    }
+  }
+}
+\section{Changes in rk.ClusterAnalysis version 0.01-6 (2012-04-06)}{
+  \subsection{changes}{
+    \itemize{
+      \item added a ChangeLog file
+      \item rebuild package for R 2.15
+    }
+  }
+}

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.js
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.js	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,161 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+
+}
+
+function calculate(){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var spnMxmmnmbr = getValue("spn_Mxmmnmbr");
+	var radMethod = getValue("rad_Method");
+	var drpCmpttnmt = getValue("drp_Cmpttnmt");
+	var spnPwrfMnkw = getValue("spn_PwrfMnkw");
+	var drpAgglmrtn = getValue("drp_Agglmrtn");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+
+	// the R code to be evaluated
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmUsnlysbsChecked && vrslSlctdvrbShortname != "") {
+		echo("\t# Use subset of variables\n\t" + varData + " <- subset(" + varData + ", select=c(\"" + vrslSlctdvrbShortname + "\"))\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcRmvmssng == "true") {
+		echo("\t# Listwise removal of missings\n\t" + varData + " <- na.omit(" + varData + ")\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcStdrdzvl == "true") {
+		echo("\t# Standardizing values\n\t" + varData + " <- scale(" + varData + ")\n");
+	}
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(radMethod == "kmeans" && varData) {
+		echo("\t# Calculate within groups sum of squares" + "\n\tclust.wss <- (nrow(" + varData + ")-1) * sum(apply(" + varData + ", 2, var))\n" + "\tfor (i in 2:" + spnMxmmnmbr + "){\n\t\tclust.wss[i] <- kmeans(" + varData + ", centers=i)$tot.withinss\n\t}\n\n");
+	}
+	if(radMethod == "hclust" && varData) {
+		echo("\t# Get clustering criterion");
+		if(frmDtprprtnEnabled == "true") {
+			echo("\n\tclust.from <- nrow(" + varData + ")-" + spnMxmmnmbr + "\n\tclust.to <- nrow(" + varData + ")-1" + "\n\tclust.wss <- hclust(dist(" + varData + ", method=\"" + drpCmpttnmt + "\"), method=\"" + drpAgglmrtn + "\")$height[clust.from:clust.to]\n\n");
+		} else {
+			echo("\n\tclust.from <- attr(" + varData + ", \"Size\")-" + spnMxmmnmbr + "\n\tclust.to <- attr(" + varData + ", \"Size\")-1" + "\n\tclust.wss <- hclust(" + varData + ", method=\"" + drpAgglmrtn + "\")$height[clust.from:clust.to]\n\n");
+		}
+	}
+}
+
+function printout(){
+	// all the real work is moved to a custom defined function doPrintout() below
+	// true in this case means: We want all the headers that should be printed in the output:
+	doPrintout(true);
+}
+
+function preview(){
+	preprocess();
+	calculate();
+	doPrintout(false);
+}
+
+function doPrintout(full){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var spnMxmmnmbr = getValue("spn_Mxmmnmbr");
+	var radMethod = getValue("rad_Method");
+	var drpCmpttnmt = getValue("drp_Cmpttnmt");
+	var spnPwrfMnkw = getValue("spn_PwrfMnkw");
+	var drpAgglmrtn = getValue("drp_Agglmrtn");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+
+	// create the plot
+	if(full) {
+		echo("rk.header(\"Determine number of clusters results\")\n");
+	}
+
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	echo("\n");
+	// in case there are generic plot options defined:
+	var embGnrcpltpCodePreprocess = getValue("emb_Gnrcpltp.code.preprocess");
+	var embGnrcpltpCodePrintout = getValue("emb_Gnrcpltp.code.printout");
+	var embGnrcpltpCodeCalculate = getValue("emb_Gnrcpltp.code.calculate");
+
+	if(full) {
+		echo("rk.graph.on()\n");
+	}
+	echo("\ttry({\n");
+
+	// insert any option-setting code that should be run before the actual plotting commands:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodePreprocess, "\n", "");
+
+	// the actual plot:
+	if(!embGnrcpltpCodePrintout.match(/sub\s*=/) && frmDtprprtnEnabled != "true") {
+		echo("\t# extract distance computation method from dist object\n\tdistance.computation <- attr(" + varData + ", \"method\")\n\n");
+	}
+	echo("\t\tplot(\n\t\t\t");
+	if(radMethod == "kmeans" && frmDtprprtnEnabled == "true") {
+		echo("1:" + spnMxmmnmbr + ",\n\t\t\tclust.wss");
+		if(!embGnrcpltpCodePrintout.match(/type\s*=/)) {
+			echo(",\n\t\t\ttype=\"b\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/xlab\s*=/)) {
+			echo(",\n\t\t\txlab=\"Number of Clusters\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/ylab\s*=/)) {
+			echo(",\n\t\t\tylab=\"Within groups sum of squares\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/main\s*=/)) {
+			echo(",\n\t\t\tmain=\"Within sum of squares by clusters\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/sub\s*=/)) {
+			echo(",\n\t\t\tsub=\"Examined " + spnMxmmnmbr + " clusters using k-means partitioning\"");
+		}
+		echo(embGnrcpltpCodePrintout.replace(/, /g, ",\n\t\t\t"));
+		echo(")");
+	}
+	if(radMethod == "hclust" || frmDtprprtnEnabled != "true") {
+		echo("clust.wss");
+		if(!embGnrcpltpCodePrintout.match(/type\s*=/)) {
+			echo(",\n\t\t\ttype=\"b\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/xlab\s*=/)) {
+			echo(",\n\t\t\txlab=\"Number of Clusters\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/ylab\s*=/)) {
+			echo(",\n\t\t\tylab=\"Agglomeration criterion\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/main\s*=/)) {
+			echo(",\n\t\t\tmain=\"Inverse Scree plot\"");
+		}
+		if(!embGnrcpltpCodePrintout.match(/sub\s*=/)) {
+			if(frmDtprprtnEnabled == "true") {
+				echo(",\n\t\t\tsub=\"Examined " + spnMxmmnmbr + " clusters (dist: " + drpCmpttnmt + ", hclust: " + drpAgglmrtn + ")\"");
+			} else {
+				echo(",\n\t\t\tsub=paste(\"Examined " + spnMxmmnmbr + " clusters (dist: \", distance.computation, \", hclust: " + drpAgglmrtn + ")\", sep=\"\")");
+			}
+		}
+		echo(",\n\t\t\txaxt=\"n\"");
+		echo(embGnrcpltpCodePrintout.replace(/, /g, ",\n\t\t\t"));
+		echo(")" + "\n\t\taxis(1, at=1:" + spnMxmmnmbr + ", labels=" + spnMxmmnmbr + ":1)");
+	}
+
+	// insert any option-setting code that should be run after the actual plot:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodeCalculate, "\n", "");
+
+	echo("\n\t})\n");
+	if(full) {
+		echo("rk.graph.off()\n");
+	}
+	if(!full) {
+		if(frmUsnlysbsChecked & vrslSlctdvrbShortname != "") {
+			echo("\nrk.header(\"Subset of variables included the analysis\", level=3)\nrk.print(list(\"" + vrslSlctdvrbShortname + "\"))\n\n");
+		}
+	}
+}
\ No newline at end of file

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.xml
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.xml	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Determinenumberofclusters.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,94 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="Determinenumberofclusters.js" />
+	<help file="Determinenumberofclusters.rkh" />
+	<logic>
+		<connect governor="current_object" client="var_data.available" />
+		<connect governor="var_data.available" client="vrs_Selectdt.root" />
+		<convert id="lgc_vardata" sources="var_data.available" mode="notequals" />
+		<connect governor="lgc_vardata" client="frm_Usnlysbs.enabled" />
+		<script>
+			<![CDATA[ 
+				gui.addChangeCommand("var_data.available", "dataChanged()");
+									// this function is called whenever the data was changed
+									dataChanged = function(){
+											var prepareFrame = "true";
+											var selectFrame = "true";
+											var thisObject = makeRObject(gui.getValue("var_data.available"));
+											if(thisObject.classes()){
+												if(!thisObject.isDataFrame()){
+													selectFrame = "false";
+													if(thisObject.classes().indexOf("dist") != -1){
+														prepareFrame = "false";
+														gui.setValue("rad_Method.string", "hclust");
+													} else {}
+												} else {}
+											} else {}
+											gui.setValue("frm_Usnlysbs.enabled", selectFrame);
+											gui.setValue("frm_Dtprprtn.enabled", prepareFrame);
+										} 
+			]]>
+		</script>
+		<convert id="lgc_drpCmptt" sources="drp_Cmpttnmt.string" mode="equals" standard="minkowski" />
+		<connect governor="lgc_drpCmptt" client="spn_PwrfMnkw.enabled" />
+		<convert id="lgc_frmDtprp" sources="frm_Dtprprtn.enabled" mode="equals" standard="true" />
+		<connect governor="lgc_frmDtprp" client="frm_Dstncmtr.enabled" />
+		<connect governor="lgc_frmDtprp" client="rad_Method.enabled" />
+		<convert id="lgc_rdMthdhc" sources="rad_Method.string" mode="equals" standard="hclust" />
+		<convert id="lgc_lgcrdMtD" sources="lgc_rdMthdhc;lgc_frmDtprp" mode="and" />
+		<connect governor="lgc_lgcrdMtD" client="frm_Dstncmtr.enabled" />
+		<connect governor="lgc_rdMthdhc" client="frm_Clustrng.enabled" />
+	</logic>
+	<dialog label="Cluster analysis: Determine number of clusters">
+		<row id="row_vSSDSUUSSS">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_vDSUUSSSDD">
+				<varslot id="var_data" label="Data (data.frame, matrix or dist)" source="vrs_Selectdt" classes="data.frame matrix dist" required="true" />
+				<frame label="Use only a subset of variables" checkable="true" checked="false" id="frm_Usnlysbs">
+					<varslot id="vrsl_Slctdvrb" label="Selected variables" source="vrs_Selectdt" multi="true" />
+				</frame>
+				<frame label="Data preparation" id="frm_Dtprprtn">
+					<checkbox id="chc_Rmvmssng" label="Remove missing values" value="true" checked="true" />
+					<checkbox id="chc_Stdrdzvl" label="Stadardize values" value="true" />
+				</frame>
+				<stretch />
+				<frame label="Plot options" id="frm_Plotptns">
+					<embed component="rkward::plot_options" as_button="true" label="Generic plot options" id="emb_Gnrcpltp" />
+					<preview />
+				</frame>
+			</column>
+			<column id="clm_sMM152MMKH">
+				<spinbox label="Maximum number of clusters to exexamine" id="spn_Mxmmnmbr" initial="15" min="2" type="integer" />
+				<stretch />
+				<radio id="rad_Method" label="Method">
+					<option label="K-means total within sum of sqares" value="kmeans" />
+					<option label="Hiearchical clustering criterion (Inverse Scree)" value="hclust" checked="true" />
+				</radio>
+				<frame label="Distance matrix" id="frm_Dstncmtr">
+					<dropdown id="drp_Cmpttnmt" label="Computation method">
+						<option label="Euclidean" value="euclidean" checked="true" />
+						<option label="Maximum" value="maximum" />
+						<option label="Manhattan (city block)" value="manhattan" />
+						<option label="Canberra" value="canberra" />
+						<option label="Binary" value="binary" />
+						<option label="Minkowski" value="minkowski" />
+					</dropdown>
+					<spinbox label="Power of Minkowski distance" id="spn_PwrfMnkw" initial="2" min="1" type="integer" />
+				</frame>
+				<frame label="Clustering" id="frm_Clustrng">
+					<dropdown id="drp_Agglmrtn" label="Agglomeration method">
+						<option label="Ward" value="ward" checked="true" />
+						<option label="Single linkage (nearest neighbor)" value="single" />
+						<option label="Complete linkage (furthest neighbor)" value="complete" />
+						<option label="Average linkage (between groups linkage)" value="average" />
+						<option label="McQuitty" value="mcquitty" />
+						<option label="Median clustering" value="median" />
+						<option label="Centroid clustering" value="centroid" />
+					</dropdown>
+				</frame>
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.js
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.js	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,179 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+
+}
+
+function calculate(){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var drpCmpttnmt = getValue("drp_Cmpttnmt");
+	var spnPwrfMnkw = getValue("spn_PwrfMnkw");
+	var drpAgglmrtn = getValue("drp_Agglmrtn");
+	var spnDrwbrdr1 = getValue("spn_Drwbrdr1");
+	var spnFrctnfhg = getValue("spn_Frctnfhg");
+	var spnMnmmhght = getValue("spn_Mnmmhght");
+	var chcPltsplts = getValue("chc_Pltsplts");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmDrwdndrgChecked = getValue("frm_Drwdndrg.checked");
+
+	// the R code to be evaluated
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmUsnlysbsChecked && vrslSlctdvrbShortname != "") {
+		echo("\t# Use subset of variables\n\t" + varData + " <- subset(" + varData + ", select=c(\"" + vrslSlctdvrbShortname + "\"))\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcRmvmssng == "true") {
+		echo("\t# Listwise removal of missings\n\t" + varData + " <- na.omit(" + varData + ")\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcStdrdzvl == "true") {
+		echo("\t# Standardizing values\n\t" + varData + " <- scale(" + varData + ")\n");
+	}
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmDtprprtnEnabled == "true") {
+		echo("\t# Compute distance matrix\n\tclust.h.distances <- dist(");
+		if(varData) {
+			echo("\n\t\tx=" + varData);
+		}
+		echo(",\n\t\tmethod=\"" + drpCmpttnmt + "\"");
+		if(drpCmpttnmt == "minkowski") {
+			echo(",\n\t\tp=" + spnPwrfMnkw);
+		}
+		echo("\n\t)\n");
+		echo("\t# Hierarchical CA\n\tclust.h.result <- hclust(d=clust.h.distances");
+		echo(",\n\t\tmethod=\"" + drpAgglmrtn + "\"");
+		echo("\n\t)\n\n");
+	} else {
+		echo("\t# Hierarchical CA\n\tclust.h.result <- hclust(");
+		if(varData) {
+			echo("\n\t\td=" + varData);
+		}
+		echo(",\n\t\tmethod=\"" + drpAgglmrtn + "\"");
+		echo("\n\t)\n\n");
+	}
+}
+
+function printout(){
+	// all the real work is moved to a custom defined function doPrintout() below
+	// true in this case means: We want all the headers that should be printed in the output:
+	doPrintout(true);
+}
+
+function preview(){
+	preprocess();
+	calculate();
+	doPrintout(false);
+}
+
+function doPrintout(full){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var drpCmpttnmt = getValue("drp_Cmpttnmt");
+	var spnPwrfMnkw = getValue("spn_PwrfMnkw");
+	var drpAgglmrtn = getValue("drp_Agglmrtn");
+	var spnDrwbrdr1 = getValue("spn_Drwbrdr1");
+	var spnFrctnfhg = getValue("spn_Frctnfhg");
+	var spnMnmmhght = getValue("spn_Mnmmhght");
+	var chcPltsplts = getValue("chc_Pltsplts");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmDrwdndrgChecked = getValue("frm_Drwdndrg.checked");
+
+	// create the plot
+	if(full) {
+		echo("rk.header(\"Hierarchical CA results\")\n");
+	}
+
+	var frmDrwdndrgChecked = getValue("frm_Drwdndrg.checked");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmDrwdndrgChecked) {
+		echo("\n");
+	// in case there are generic plot options defined:
+	var embGnrcpltpCodePreprocess = getValue("emb_Gnrcpltp.code.preprocess");
+	var embGnrcpltpCodePrintout = getValue("emb_Gnrcpltp.code.printout");
+	var embGnrcpltpCodeCalculate = getValue("emb_Gnrcpltp.code.calculate");
+
+	if(full) {
+		echo("rk.graph.on()\n");
+	}
+	echo("\ttry({\n");
+
+	// insert any option-setting code that should be run before the actual plotting commands:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodePreprocess, "\n", "");
+
+	// the actual plot:
+	if(!embGnrcpltpCodePrintout.match(/sub\s*=/) && frmDtprprtnEnabled != "true") {
+		echo("\t# extract distance computation method from dist object\n\tdistance.computation <- attr(" + varData + ", \"method\")\n\n");
+	}
+	echo("\t\tplclust(clust.h.result");
+	if(!embGnrcpltpCodePrintout.match(/main\s*=/)) {
+		echo(",\n\t\t\tmain=\"Cluster dendrogram\"");
+	}
+	if(!embGnrcpltpCodePrintout.match(/sub\s*=/)) {
+		if(frmDtprprtnEnabled == "true") {
+			echo(",\n\t\t\tsub=\"Distance computation: " + drpCmpttnmt + ", agglomeration method: " + drpAgglmrtn + "\"");
+		} else {
+			echo(",\n\t\t\tsub=paste(\"Distance computation: \", distance.computation, \", agglomeration method: " + drpAgglmrtn + "\", sep=\"\")");
+		}
+	}
+	if(!embGnrcpltpCodePrintout.match(/xlab\s*=/)) {
+		echo(",\n\t\t\txlab=\"Data: " + varData + "\"");
+	}
+	if(chcPltsplts) {
+		echo(",\n\t\t\tunit=TRUE");
+	}
+	if(spnFrctnfhg != 0.1) {
+		echo(",\n\t\t\thang=" + spnFrctnfhg);
+	}
+	if(spnMnmmhght != 0) {
+		echo(",\n\t\t\thmin=" + spnMnmmhght);
+	}
+	echo(embGnrcpltpCodePrintout.replace(/, /g, ",\n\t\t\t"));
+	echo(")");
+	if(spnDrwbrdr1 > 1) {
+		echo("\n\t\trect.hclust(clust.h.result, k=" + spnDrwbrdr1 + ", border=\"red\")");
+	}
+
+	// insert any option-setting code that should be run after the actual plot:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodeCalculate, "\n", "");
+
+	echo("\n\t})\n");
+	if(full) {
+		echo("rk.graph.off()\n");
+	}
+	}
+	if(full) {
+		echo("\nrk.print(clust.h.result)\n");
+		if(frmUsnlysbsChecked & vrslSlctdvrbShortname != "") {
+			echo("\nrk.header(\"Subset of variables included the analysis\", level=3)\nrk.print(list(\"" + vrslSlctdvrbShortname + "\"))\n\n");
+		}
+	}
+
+	// left over from the printout function
+
+	//// save result object
+	// read in saveobject variables
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var svbSvrsltstActive = getValue("svb_Svrsltst.active");
+	var svbSvrsltstParent = getValue("svb_Svrsltst.parent");
+	// assign object to chosen environment
+	if(svbSvrsltstActive) {
+		echo(".GlobalEnv$" + svbSvrsltst + " <- clust.h.result\n");
+	}
+
+
+}
\ No newline at end of file

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.xml
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.xml	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/HierarchicalCA.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,93 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="HierarchicalCA.js" />
+	<help file="HierarchicalCA.rkh" />
+	<logic>
+		<connect governor="current_object" client="var_data.available" />
+		<connect governor="var_data.available" client="vrs_Selectdt.root" />
+		<convert id="lgc_vardata" sources="var_data.available" mode="notequals" />
+		<connect governor="lgc_vardata" client="frm_Usnlysbs.enabled" />
+		<script>
+			<![CDATA[ 
+				gui.addChangeCommand("var_data.available", "dataChanged()");
+							// this function is called whenever the data was changed
+							dataChanged = function(){
+									var prepareFrame = "true";
+									var selectFrame = "true";
+									var thisObject = makeRObject(gui.getValue("var_data.available"));
+									 if(thisObject.classes()){
+										if(!thisObject.isDataFrame()){
+											selectFrame = "false";
+											if(thisObject.classes().indexOf("dist") != -1){
+												prepareFrame = "false";
+											} else {}
+										} else {}
+									} else {}
+									gui.setValue("frm_Usnlysbs.enabled", selectFrame);
+									gui.setValue("frm_Dtprprtn.enabled", prepareFrame);
+								} 
+			]]>
+		</script>
+		<convert id="lgc_drpCmptt" sources="drp_Cmpttnmt.string" mode="equals" standard="minkowski" />
+		<connect governor="lgc_drpCmptt" client="spn_PwrfMnkw.enabled" />
+		<set id="emb_Gnrcpltp.allow_type" to="false" />
+		<set id="emb_Gnrcpltp.axistypes.visible" to="false" />
+		<set id="emb_Gnrcpltp.scale.visible" to="false" />
+		<convert id="lgc_frmDtprp" sources="frm_Dtprprtn.enabled" mode="equals" standard="true" />
+		<connect governor="lgc_frmDtprp" client="frm_Dstncmtr.enabled" />
+	</logic>
+	<dialog label="Cluster analysis: Hierarchical">
+		<row id="row_vSSDSUUSSS">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_vDSUUSSSDD">
+				<varslot id="var_data" label="Data (data.frame, matrix or dist)" source="vrs_Selectdt" classes="data.frame matrix dist" required="true" />
+				<frame label="Use only a subset of variables" checkable="true" checked="false" id="frm_Usnlysbs">
+					<varslot id="vrsl_Slctdvrb" label="Selected variables" source="vrs_Selectdt" multi="true" />
+				</frame>
+				<frame label="Data preparation" id="frm_Dtprprtn">
+					<checkbox id="chc_Rmvmssng" label="Remove missing values" value="true" checked="true" />
+					<checkbox id="chc_Stdrdzvl" label="Stadardize values" value="true" />
+				</frame>
+				<stretch />
+				<saveobject label="Save results to workspace" checkable="true" initial="clust.h.result" id="svb_Svrsltst" />
+			</column>
+			<column id="clm_fDDCCEMMCB">
+				<frame label="Distance matrix" id="frm_Dstncmtr">
+					<dropdown id="drp_Cmpttnmt" label="Computation method">
+						<option label="Euclidean" value="euclidean" checked="true" />
+						<option label="Maximum" value="maximum" />
+						<option label="Manhattan (city block)" value="manhattan" />
+						<option label="Canberra" value="canberra" />
+						<option label="Binary" value="binary" />
+						<option label="Minkowski" value="minkowski" />
+					</dropdown>
+					<spinbox label="Power of Minkowski distance" id="spn_PwrfMnkw" initial="2" min="1" type="integer" />
+				</frame>
+				<frame label="Clustering" id="frm_Clustrng">
+					<dropdown id="drp_Agglmrtn" label="Agglomeration method">
+						<option label="Ward" value="ward" checked="true" />
+						<option label="Single linkage (nearest neighbor)" value="single" />
+						<option label="Complete linkage (furthest neighbor)" value="complete" />
+						<option label="Average linkage (between groups linkage)" value="average" />
+						<option label="McQuitty" value="mcquitty" />
+						<option label="Median clustering" value="median" />
+						<option label="Centroid clustering" value="centroid" />
+					</dropdown>
+				</frame>
+				<stretch />
+				<frame label="Draw dendrogram" checkable="true" id="frm_Drwdndrg">
+					<spinbox label="Draw border around clusters (1 for none)" id="spn_Drwbrdr1" initial="1" min="1" type="integer" />
+					<spinbox label="Fraction of height by which labels should hang below plot" id="spn_Frctnfhg" initial="0.1" min="0" />
+					<spinbox label="Minimum height (suppress details below)" id="spn_Mnmmhght" min="0" />
+					<frame id="frm_chckbxdcPP">
+						<checkbox id="chc_Pltsplts" label="Plot splits at equally-spaced heights (not object height)" value="true" />
+					</frame>
+					<embed component="rkward::plot_options" as_button="true" label="Generic plot options" id="emb_Gnrcpltp" />
+					<preview />
+				</frame>
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.js
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.js	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,148 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+
+}
+
+function calculate(){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var spnNmbrfcls = getValue("spn_Nmbrfcls");
+	var drpAlgorthm = getValue("drp_Algorthm");
+	var spnMxmmnmbr = getValue("spn_Mxmmnmbr");
+	var spnIntlrndm = getValue("spn_Intlrndm");
+	var chcPltclstr = getValue("chc_Pltclstr");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+
+	// the R code to be evaluated
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmUsnlysbsChecked && vrslSlctdvrbShortname != "") {
+		echo("\t# Use subset of variables\n\t" + varData + " <- subset(" + varData + ", select=c(\"" + vrslSlctdvrbShortname + "\"))\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcRmvmssng == "true") {
+		echo("\t# Listwise removal of missings\n\t" + varData + " <- na.omit(" + varData + ")\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcStdrdzvl == "true") {
+		echo("\t# Standardizing values\n\t" + varData + " <- scale(" + varData + ")\n");
+	}
+	echo("\tclust.k.result <- kmeans(");
+	if(varData) {
+		echo("\n\t\tx=" + varData);
+	}
+	echo(",\n\t\tcenters=" + spnNmbrfcls);
+	if(drpAlgorthm != "Hartigan-Wong") {
+		echo(",\n\t\talgorithm=\"" + drpAlgorthm + "\"");
+	}
+	if(spnMxmmnmbr != 10) {
+		echo(",\n\t\titer.max=" + spnMxmmnmbr);
+	}
+	if(spnIntlrndm != 1) {
+		echo(",\n\t\tnstart=" + spnIntlrndm);
+	}
+	echo("\n\t)\n\n");
+}
+
+function printout(){
+	// all the real work is moved to a custom defined function doPrintout() below
+	// true in this case means: We want all the headers that should be printed in the output:
+	doPrintout(true);
+}
+
+function preview(){
+	preprocess();
+	calculate();
+	doPrintout(false);
+}
+
+function doPrintout(full){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var spnNmbrfcls = getValue("spn_Nmbrfcls");
+	var drpAlgorthm = getValue("drp_Algorthm");
+	var spnMxmmnmbr = getValue("spn_Mxmmnmbr");
+	var spnIntlrndm = getValue("spn_Intlrndm");
+	var chcPltclstr = getValue("chc_Pltclstr");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+
+	// create the plot
+	if(full) {
+		echo("rk.header(\"Cluster analysis\")\n");
+	}
+
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	if(frmPltrsltsChecked) {
+		echo("\n");
+	// in case there are generic plot options defined:
+	var embGnrcpltpCodePreprocess = getValue("emb_Gnrcpltp.code.preprocess");
+	var embGnrcpltpCodePrintout = getValue("emb_Gnrcpltp.code.printout");
+	var embGnrcpltpCodeCalculate = getValue("emb_Gnrcpltp.code.calculate");
+
+	if(full) {
+		echo("rk.graph.on()\n");
+	}
+	echo("\ttry({\n");
+
+	// insert any option-setting code that should be run before the actual plotting commands:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodePreprocess, "\n", "");
+
+	// the actual plot:
+	echo("\t\tplot(" + varData + ",\n\t\t\tcol=clust.k.result$cluster");
+	if(!embGnrcpltpCodePrintout.match(/main\s*=/)) {
+		echo(",\n\t\t\tmain=\"K-means partitioning\"");
+	}
+	if(!embGnrcpltpCodePrintout.match(/sub\s*=/)) {
+		echo(",\n\t\t\tsub=\"Grouped into " + spnNmbrfcls + " clusters by the " + drpAlgorthm + " algorithm\"");
+	}
+	echo(embGnrcpltpCodePrintout.replace(/, /g, ",\n\t\t\t"));
+	echo(")");
+	if(chcPltclstr) {
+		echo("\n\t\tpoints(clust.k.result$centers, col=1:" + spnNmbrfcls + ", pch=8, cex=2)");
+	}
+
+	// insert any option-setting code that should be run after the actual plot:
+	printIndentedUnlessEmpty("\t\t", embGnrcpltpCodeCalculate, "\n", "");
+
+	echo("\n\t})\n");
+	if(full) {
+		echo("rk.graph.off()\n");
+	}
+	}
+	if(full) {
+		echo("\nrk.print(clust.k.result)\n");
+		if(frmUsnlysbsChecked & vrslSlctdvrbShortname != "") {
+			echo("\nrk.header(\"Subset of variables included the analysis\", level=3)\nrk.print(list(\"" + vrslSlctdvrbShortname + "\"))\n\n");
+		}
+	}
+
+	// left over from the printout function
+
+	//// save result object
+	// read in saveobject variables
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var svbSvrsltstActive = getValue("svb_Svrsltst.active");
+	var svbSvrsltstParent = getValue("svb_Svrsltst.parent");
+	// assign object to chosen environment
+	if(svbSvrsltstActive) {
+		echo(".GlobalEnv$" + svbSvrsltst + " <- clust.k.result\n");
+	}
+
+
+}
\ No newline at end of file

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.xml
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.xml	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/Kmeanspartitioning.xml	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,73 @@
+<!DOCTYPE rkplugin>
+<document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
+	<code file="Kmeanspartitioning.js" />
+	<help file="Kmeanspartitioning.rkh" />
+	<include file="../rk.ClusterAnalysis.pluginmap" />
+	<logic>
+		<connect governor="current_object" client="var_data.available" />
+		<connect governor="var_data.available" client="vrs_Selectdt.root" />
+		<convert id="lgc_vardata" sources="var_data.available" mode="notequals" />
+		<connect governor="lgc_vardata" client="frm_Usnlysbs.enabled" />
+		<script>
+			<![CDATA[ 
+				gui.addChangeCommand("var_data.available", "dataChanged()");
+							// this function is called whenever the data was changed
+							dataChanged = function(){
+									var prepareFrame = "true";
+									var selectFrame = "true";
+									var thisObject = makeRObject(gui.getValue("var_data.available"));
+									 if(thisObject.classes()){
+										if(!thisObject.isDataFrame()){
+											selectFrame = "false";
+											if(thisObject.classes().indexOf("dist") != -1){
+												prepareFrame = "false";
+											} else {}
+										} else {}
+									} else {}
+									gui.setValue("frm_Usnlysbs.enabled", selectFrame);
+									gui.setValue("frm_Dtprprtn.enabled", prepareFrame);
+								} 
+			]]>
+		</script>
+	</logic>
+	<dialog label="Cluster analysis: K-means partitioning">
+		<row id="row_vSSDSUUSSS">
+			<varselector id="vrs_Selectdt" label="Select data" />
+			<column id="clm_vDSUUSSSDD">
+				<varslot id="var_data" label="Data (data.frame or matrix)" source="vrs_Selectdt" classes="data.frame matrix" required="true" />
+				<frame label="Use only a subset of variables" checkable="true" checked="false" id="frm_Usnlysbs">
+					<varslot id="vrsl_Slctdvrb" label="Selected variables" source="vrs_Selectdt" multi="true" />
+				</frame>
+				<frame label="Data preparation" id="frm_Dtprprtn">
+					<checkbox id="chc_Rmvmssng" label="Remove missing values" value="true" checked="true" />
+					<checkbox id="chc_Stdrdzvl" label="Stadardize values" value="true" />
+				</frame>
+				<stretch />
+				<saveobject label="Save results to workspace" checkable="true" initial="clust.k.result" id="svb_Svrsltst" />
+			</column>
+			<column id="clm_fNN2NN2AAA">
+				<frame id="frm_spnbxlbNN2">
+					<spinbox label="Number of clusters to extract" id="spn_Nmbrfcls" min="2" type="integer" />
+				</frame>
+				<stretch />
+				<frame label="Advanced options" id="frm_Advncdpt">
+					<dropdown id="drp_Algorthm" label="Algorithm">
+						<option label="Hartigan & Wong" value="Hartigan-Wong" checked="true" />
+						<option label="Lloyd" value="Lloyd" />
+						<option label="Forgy" value="Forgy" />
+						<option label="MacQueen" value="MacQueen" />
+					</dropdown>
+					<spinbox label="Maximum number of iterations" id="spn_Mxmmnmbr" initial="10" min="1" type="integer" />
+					<spinbox label="Initial random set of centers" id="spn_Intlrndm" initial="1" min="1" type="integer" />
+				</frame>
+				<frame label="Plot results" checkable="true" id="frm_Pltrslts">
+					<checkbox id="chc_Pltclstr" label="Plot cluster centers" value="true" checked="true" />
+					<embed component="rkward::plot_options" as_button="true" label="Generic plot options" id="emb_Gnrcpltp" />
+					<preview />
+				</frame>
+			</column>
+		</row>
+	</dialog>
+</document>

Added: branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/ModelbasedCA.js
===================================================================
--- branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/ModelbasedCA.js	                        (rev 0)
+++ branches/external_plugins/rk.ClusterAnalysis/inst/rkward/plugins/ModelbasedCA.js	2012-09-29 21:50:21 UTC (rev 4331)
@@ -0,0 +1,117 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(){
+	// add requirements etc. here
+	echo("require(mclust)\n");
+}
+
+function calculate(){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var spnMxnmbrfc = getValue("spn_Mxnmbrfc");
+	var radPlottype = getValue("rad_Plottype");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+
+	// the R code to be evaluated
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	var frmDtprprtnEnabled = getValue("frm_Dtprprtn.enabled");
+	if(frmUsnlysbsChecked && vrslSlctdvrbShortname != "") {
+		echo("\t# Use subset of variables\n\t" + varData + " <- subset(" + varData + ", select=c(\"" + vrslSlctdvrbShortname + "\"))\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcRmvmssng == "true") {
+		echo("\t# Listwise removal of missings\n\t" + varData + " <- na.omit(" + varData + ")\n");
+	}
+	if(frmDtprprtnEnabled == "true" && chcStdrdzvl == "true") {
+		echo("\t# Standardizing values\n\t" + varData + " <- scale(" + varData + ")\n");
+	}
+	echo("\t# Model based CA\n\tclust.m.result <- Mclust(data=" + varData);
+	if(spnMxnmbrfc != 9) {
+		echo(",\n\t\tG=1:" + spnMxnmbrfc + "\n\t");
+	}
+	echo(")\n\n");
+}
+
+function printout(){
+	// all the real work is moved to a custom defined function doPrintout() below
+	// true in this case means: We want all the headers that should be printed in the output:
+	doPrintout(true);
+}
+
+function preview(){
+	preprocess();
+	calculate();
+	doPrintout(false);
+}
+
+function doPrintout(full){
+	// read in variables from dialog
+	var varData = getValue("var_data");
+	var vrslSlctdvrb = getValue("vrsl_Slctdvrb");
+	var chcRmvmssng = getValue("chc_Rmvmssng");
+	var chcStdrdzvl = getValue("chc_Stdrdzvl");
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var spnMxnmbrfc = getValue("spn_Mxnmbrfc");
+	var radPlottype = getValue("rad_Plottype");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+
+	// create the plot
+	if(full) {
+		echo("rk.header(\"Model based CA results\")\n");
+	}
+
+	var frmPltrsltsChecked = getValue("frm_Pltrslts.checked");
+	var frmUsnlysbsChecked = getValue("frm_Usnlysbs.checked");
+	var vrslSlctdvrbShortname = getValue("vrsl_Slctdvrb.shortname").split("\n").join("\", \"");
+	if(frmPltrsltsChecked) {
+		echo("\n");
+	
+
+	if(full) {
+		echo("rk.graph.on()\n");
+	}
+	echo("\ttry({\n");
+
+	
+
+	// the actual plot:
+	echo("\t\tplot(clust.m.result,\n\t\t\tdata=" + varData + ",\n\t\t\twhat=\"" + radPlottype + "\"");
+	echo(")");
+
+	
+
+	echo("\n\t})\n");
+	if(full) {
+		echo("rk.graph.off()\n");
+	}
+	}
+	if(full) {
+		echo("\nrk.print(clust.m.result)\n");
+	if(frmUsnlysbsChecked & vrslSlctdvrbShortname != "") {
+		echo("\nrk.header(\"Subset of variables included the analysis\", level=3)\nrk.print(list(\"" + vrslSlctdvrbShortname + "\"))\n\n");
+	}
+	}
+
+	// left over from the printout function
+
+	//// save result object
+	// read in saveobject variables
+	var svbSvrsltst = getValue("svb_Svrsltst");
+	var svbSvrsltstActive = getValue("svb_Svrsltst.active");
+	var svbSvrsltstParent = getValue("svb_Svrsltst.parent");
+	// assign object to chosen environment
+	if(svbSvrsltstActive) {
+		echo(".GlobalEnv$" + svbSvrsltst + " <- clust.m.result\n");
+	}
+
+
+}
\ No newline at end of file


@@ 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