[rkward-cvs] SF.net SVN: rkward:[2737] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Feb 11 09:53:12 UTC 2010
Revision: 2737
http://rkward.svn.sourceforge.net/rkward/?rev=2737&view=rev
Author: tfry
Date: 2010-02-11 09:53:12 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
Cleanups
Modified Paths:
--------------
trunk/rkward/rkward/plugins/plots/box_plot.js
trunk/rkward/tests/plots/RKTestStandard.boxplot.rkcommands.R
Removed Paths:
-------------
trunk/rkward/rkward/plugins/plots/box_plot.php
Modified: trunk/rkward/rkward/plugins/plots/box_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.js 2010-02-11 09:27:40 UTC (rev 2736)
+++ trunk/rkward/rkward/plugins/plots/box_plot.js 2010-02-11 09:53:12 UTC (rev 2737)
@@ -27,7 +27,7 @@
plot_adds = getValue ("plotoptions.code.calculate"); //add grid and alike
- echo (' data_list <- list (' + xvarsstring + ') #convert single sample variables to list\n');
+ echo ('data_list <- list (' + xvarsstring + ') #convert single sample variables to list\n');
if (names_mode == "rexp") {
echo ("names(data_list) <- " + getValue ("names_exp") + "\n");
} else if (names_mode == "custom") {
Deleted: trunk/rkward/rkward/plugins/plots/box_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.php 2010-02-11 09:27:40 UTC (rev 2736)
+++ trunk/rkward/rkward/plugins/plots/box_plot.php 2010-02-11 09:53:12 UTC (rev 2737)
@@ -1,72 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-}
-
-function preview () {
- preprocess ();
- calculate ();
- doPrintout (false);
-}
-
-function printout () {
- doPrintout (true);
-}
-
-function doPrintout ($final) {
- $xvarsstring = join (", ", split ("\n", getRK_val ("x")));
- $names_mode = getRK_val ("names_mode");
- $mean = getRK_val ("mean");
- $pch_mean = getRK_val ("pch_mean");
- $sd = getRK_val ("sd");
- $pch_sd_high = getRK_val ("pch_sd_high");
- $pch_sd_low = getRK_val ("pch_sd_low");
- $horizontal = getRK_val ("orientation");
- $plot_adds = getRK_val ("plotoptions.code.calculate"); //add grid and alike
-
-?>
- data_list <- list (<?echo ($xvarsstring); ?>) #convert single sample variables to list
-<?
- if ($names_mode == "rexp") {
- echo ("names(data_list) <- " . getRK_val ("names_exp") . "\n");
- } else if ($names_mode == "custom") {
- echo ("names(data_list) <- c (\"" . str_replace (";", "\", \"", trim (getRK_val ("names_custom"))) . "\")\n");
- }
-
- if ($final) {
-?>
-rk.header ("Boxplot", list ("Variable(s)", rk.get.description (<? echo ($xvarsstring); ?>, paste.sep=", ")))
-rk.graph.on()
-<? } ?>
-try (boxplot (data_list, notch = <? getRK ("notch") ?>, outline = <? getRK("outline")?>, horizontal = <? getRK("orientation"); ?><? getRK ("plotoptions.code.printout"); ?>)) #actuall boxplot function
-<? if (($mean == "TRUE") && ($horizontal == "TRUE")) {?>
- try (points(1:length(data_list) ~ apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE),pch=<? echo ($pch_mean); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)) #calculates the mean for all data and adds a point at the corresponding position
-<? } if (($mean == "TRUE") && ($horizontal == "FALSE")) {?>
- try (points(apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE),pch=<? echo ($pch_mean); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)) #calculates the mean for all data and adds a point at the corresponding position
-<? }
-?>
-<? if (($sd == "TRUE") && ($horizontal == "FALSE")) {?>
- sd_low <- (apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE)) - (apply(data.frame(<? echo ($xvarsstring); ?>),2,sd,na.rm = TRUE))
- sd_high <- (apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE)) + (apply(data.frame(<? echo ($xvarsstring); ?>),2,sd,na.rm = TRUE))
- points(sd_low,pch=<? echo ($pch_sd_low); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)
- points(sd_high,pch=<? echo ($pch_sd_high); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)
-<? } if (($sd == "TRUE") && ($horizontal == "TRUE")) {?>
- sd_low <- (apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE)) - (apply(data.frame(<? echo ($xvarsstring); ?>),2,sd,na.rm = TRUE))
- sd_high <- (apply(data.frame(<? echo ($xvarsstring); ?>),2,mean,na.rm = TRUE)) + (apply(data.frame(<? echo ($xvarsstring); ?>),2,sd,na.rm = TRUE))
- points(1:length(data_list) ~ sd_low,pch=<? echo ($pch_sd_low); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)
- points(1:length(data_list) ~ sd_high,pch=<? echo ($pch_sd_high); ?>, cex = <? getRK ("cex_sd_mean"); ?><? getRK ("sd_mean_color.code.printout"); ?>)
-<? }
-?>
-<? if (!empty ($plot_adds)) { ?>
-
-<? // print the grid() related code
- printIndented ("\t", $plot_adds);
- }
-?>
-<? if ($final) { ?>
-rk.graph.off ()
-<? }
-}
-?>
Modified: trunk/rkward/tests/plots/RKTestStandard.boxplot.rkcommands.R
===================================================================
--- trunk/rkward/tests/plots/RKTestStandard.boxplot.rkcommands.R 2010-02-11 09:27:40 UTC (rev 2736)
+++ trunk/rkward/tests/plots/RKTestStandard.boxplot.rkcommands.R 2010-02-11 09:53:12 UTC (rev 2737)
@@ -2,7 +2,7 @@
## Prepare
## Compute
## Print result
- data_list <- list (women[["weight"]], women[["height"]]) #convert single sample variables to list
+data_list <- list (women[["weight"]], women[["height"]]) #convert single sample variables to list
rk.header ("Boxplot", list ("Variable(s)", rk.get.description (women[["weight"]], women[["height"]], paste.sep=", ")))
rk.graph.on()
try (boxplot (data_list, notch = FALSE, outline = TRUE, horizontal = FALSE)) #actuall boxplot function
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