[rkward-cvs] SF.net SVN: rkward: [1328] trunk/rkward/rkward/plugins/analysis

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Feb 5 18:30:34 UTC 2007


Revision: 1328
          http://svn.sourceforge.net/rkward/?rev=1328&view=rev
Author:   tfry
Date:     2007-02-05 10:30:34 -0800 (Mon, 05 Feb 2007)

Log Message:
-----------
Rename correlation matrix plugin files

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/corr_matrix.php
    trunk/rkward/rkward/plugins/analysis/corr_matrix.xml

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/analysis/corr_matrix/code.php
    trunk/rkward/rkward/plugins/analysis/corr_matrix/description.xml

Deleted: trunk/rkward/rkward/plugins/analysis/corr_matrix/code.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/corr_matrix/code.php	2007-02-05 18:25:51 UTC (rev 1327)
+++ trunk/rkward/rkward/plugins/analysis/corr_matrix/code.php	2007-02-05 18:30:34 UTC (rev 1328)
@@ -1,50 +0,0 @@
-<?
-function preprocess () {
-}
-	
-function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>rk.temp.objects <- list (<? echo ($vars); ?>)
-
-# cor requires all object to be inside the same data.frame.
-# Here we construct such a temporary frame from the input variables
-rk.temp.frame <- data.frame (lapply (rk.temp.objects, eval))
-
-# calculate correlation matrix
-rk.temp <- cor (rk.temp.frame, use="<? getRK ("use"); ?>", method="<? getRK ("method"); ?>")
-<?	if (getRK_val ("do_p")) { ?>
-# calculate matrix of probabilities
-rk.temp.p <- matrix (nrow = length (rk.temp.objects), ncol = length (rk.temp.objects))
-local (
-	for (i in 1:length (rk.temp.objects)) {
-		for (j in i:length (rk.temp.objects)) {
-			if (i != j) {
-				t <- cor.test (eval (rk.temp.objects[[i]]), eval (rk.temp.objects[[j]]), use="<? getRK ("use"); ?>", method="<? getRK ("method"); ?>")
-				rk.temp.p[i, j] <<- t$p.value
-				rk.temp.p[j, i] <<- t$parameter["df"]
-			}
-		}
-	}
-)
-<?	}
-}
-
-function printout () {
-?>
-rk.header ("Correlation Matrix", parameters=list ("Method", "<? getRK ("method"); ?>", "Exclusion", "<? getRK ("use"); ?>"))
-
-rk.temp <- data.frame (I (sapply (rk.temp.objects, FUN=function (x) rk.get.description (x, is.substitute=TRUE))), as.data.frame (rk.temp))
-rk.results (rk.temp, titles=c ('Coefficient', sapply (rk.temp.objects, rk.get.short.name)))
-
-<?	if (getRK_val ("do_p")) { ?>
-rk.temp.p <- data.frame (I (sapply (rk.temp.objects, FUN=function (x) rk.get.description (x, is.substitute=TRUE))), as.data.frame (rk.temp.p))
-rk.results (rk.temp.p, titles=c ('df \\ p', sapply (rk.temp.objects, rk.get.short.name)))
-<?	}
-}
-
-function cleanup () {
-?>rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-}
-?>

Deleted: trunk/rkward/rkward/plugins/analysis/corr_matrix/description.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/corr_matrix/description.xml	2007-02-05 18:25:51 UTC (rev 1327)
+++ trunk/rkward/rkward/plugins/analysis/corr_matrix/description.xml	2007-02-05 18:30:34 UTC (rev 1328)
@@ -1,29 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<document>
-	<code file="code.php"/>
-	
-	<dialog label="Correlation matrix">
-		<tabbook>
-			<tab label="variables">
-				<row>
-					<varselector id="vars"/>
-					<varslot type="numeric" min_vars="2" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
-				</row>
-			</tab>
-			<tab label="options">
-				<checkbox id="do_p" label="Calculate p values" checked="true"/>
-				<radio id="method" label="Method">
-					<option value="pearson" label="Pearson"/>
-					<option value="kendall" label="Kendall"/>
-					<option value="spearman" label="Spearman"/>
-				</radio>
-				<radio id="use" label="Exclude missing values">
-					<option value="complete.obs" label="whole cases"/>
-					<option value="pairwise.complete.obs" label="pairwise" checked="true"/>
-				</radio>
-			</tab>
-		</tabbook>
-	</dialog>
-
-</document>

Copied: trunk/rkward/rkward/plugins/analysis/corr_matrix.php (from rev 1327, trunk/rkward/rkward/plugins/analysis/corr_matrix/code.php)
===================================================================
--- trunk/rkward/rkward/plugins/analysis/corr_matrix.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/corr_matrix.php	2007-02-05 18:30:34 UTC (rev 1328)
@@ -0,0 +1,50 @@
+<?
+function preprocess () {
+}
+	
+function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>rk.temp.objects <- list (<? echo ($vars); ?>)
+
+# cor requires all object to be inside the same data.frame.
+# Here we construct such a temporary frame from the input variables
+rk.temp.frame <- data.frame (lapply (rk.temp.objects, eval))
+
+# calculate correlation matrix
+rk.temp <- cor (rk.temp.frame, use="<? getRK ("use"); ?>", method="<? getRK ("method"); ?>")
+<?	if (getRK_val ("do_p")) { ?>
+# calculate matrix of probabilities
+rk.temp.p <- matrix (nrow = length (rk.temp.objects), ncol = length (rk.temp.objects))
+local (
+	for (i in 1:length (rk.temp.objects)) {
+		for (j in i:length (rk.temp.objects)) {
+			if (i != j) {
+				t <- cor.test (eval (rk.temp.objects[[i]]), eval (rk.temp.objects[[j]]), use="<? getRK ("use"); ?>", method="<? getRK ("method"); ?>")
+				rk.temp.p[i, j] <<- t$p.value
+				rk.temp.p[j, i] <<- t$parameter["df"]
+			}
+		}
+	}
+)
+<?	}
+}
+
+function printout () {
+?>
+rk.header ("Correlation Matrix", parameters=list ("Method", "<? getRK ("method"); ?>", "Exclusion", "<? getRK ("use"); ?>"))
+
+rk.temp <- data.frame (I (sapply (rk.temp.objects, FUN=function (x) rk.get.description (x, is.substitute=TRUE))), as.data.frame (rk.temp))
+rk.results (rk.temp, titles=c ('Coefficient', sapply (rk.temp.objects, rk.get.short.name)))
+
+<?	if (getRK_val ("do_p")) { ?>
+rk.temp.p <- data.frame (I (sapply (rk.temp.objects, FUN=function (x) rk.get.description (x, is.substitute=TRUE))), as.data.frame (rk.temp.p))
+rk.results (rk.temp.p, titles=c ('df \\ p', sapply (rk.temp.objects, rk.get.short.name)))
+<?	}
+}
+
+function cleanup () {
+?>rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>

Copied: trunk/rkward/rkward/plugins/analysis/corr_matrix.xml (from rev 1327, trunk/rkward/rkward/plugins/analysis/corr_matrix/description.xml)
===================================================================
--- trunk/rkward/rkward/plugins/analysis/corr_matrix.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/corr_matrix.xml	2007-02-05 18:30:34 UTC (rev 1328)
@@ -0,0 +1,29 @@
+<!DOCTYPE rkplugin>
+
+<document>
+	<code file="corr_matrix.php"/>
+	
+	<dialog label="Correlation matrix">
+		<tabbook>
+			<tab label="variables">
+				<row>
+					<varselector id="vars"/>
+					<varslot type="numeric" min_vars="2" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
+				</row>
+			</tab>
+			<tab label="options">
+				<checkbox id="do_p" label="Calculate p values" checked="true"/>
+				<radio id="method" label="Method">
+					<option value="pearson" label="Pearson"/>
+					<option value="kendall" label="Kendall"/>
+					<option value="spearman" label="Spearman"/>
+				</radio>
+				<radio id="use" label="Exclude missing values">
+					<option value="complete.obs" label="whole cases"/>
+					<option value="pairwise.complete.obs" label="pairwise" checked="true"/>
+				</radio>
+			</tab>
+		</tabbook>
+	</dialog>
+
+</document>


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




More information about the rkward-tracker mailing list