[rkward-cvs] SF.net SVN: rkward: [2128] branches/release_branch_0.4.8

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 25 17:39:00 UTC 2007


Revision: 2128
          http://rkward.svn.sourceforge.net/rkward/?rev=2128&view=rev
Author:   tfry
Date:     2007-10-25 10:39:00 -0700 (Thu, 25 Oct 2007)

Log Message:
-----------
Merge everything from trunk since 0.4.8 release into the 0.4.8 rlease branch (for 0.4.8a)

Modified Paths:
--------------
    branches/release_branch_0.4.8/ChangeLog
    branches/release_branch_0.4.8/TODO
    branches/release_branch_0.4.8/debian/changelog
    branches/release_branch_0.4.8/debian/rkward.1
    branches/release_branch_0.4.8/rkward/main.cpp
    branches/release_branch_0.4.8/rkward/plugin/rkcomponentproperties.cpp
    branches/release_branch_0.4.8/rkward/plugin/rkvarslot.cpp
    branches/release_branch_0.4.8/rkward/plugins/analysis/crosstab.php
    branches/release_branch_0.4.8/rkward/plugins/analysis/moments/moment.php
    branches/release_branch_0.4.8/rkward/rbackend/rkstructuregetter.cpp
    branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/DESCRIPTION
    branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/R/internal.R
    branches/release_branch_0.4.8/rkward/rkward.sh.template

Modified: branches/release_branch_0.4.8/ChangeLog
===================================================================
--- branches/release_branch_0.4.8/ChangeLog	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/ChangeLog	2007-10-25 17:39:00 UTC (rev 2128)
@@ -1,3 +1,9 @@
+- Fixed: Analysis->Moments->Moment plugin did not use the order-parameter
+- Fixed: Crash on simple assignments in globalenv() with R < 2.4.0
+- Fixed: Meta information (labels) did not get shown correctly in the data editor
+- Add command line option "--debugger" for debugging purposes
+- Fixed: Pressing the add button in a varslot with no object selected could crash RKWard
+
 --- Version 0.4.8 - Oct-03-2007
 - New plugins: pie chart, dot chart, crosstabulation, two time-series tests, and basic linear regression
 - barplot plugin allow specification of custom labels

Modified: branches/release_branch_0.4.8/TODO
===================================================================
--- branches/release_branch_0.4.8/TODO	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/TODO	2007-10-25 17:39:00 UTC (rev 2128)
@@ -6,7 +6,9 @@
 	- Around March 1st, write to R-devel to achieve having IS_UTF8 and IS_LATIN1 in public API (if not already available, then).
 		- Is Rf_translateChar() what we are looking for?
 
-Should be fixed for 0.4.8:
+Should be fixed for 0.4.9:
+	- make rk.results work with matrices
+		- use in crosstabs n to 1 plugin
 
 Advertizing:
 	- start being a bit bolder about RKWard (descriptions, startup notification, etc.)
@@ -139,6 +141,13 @@
 			- likely, package environments should try to fetch vignettes, when "updating"
 
 Internal stuff:
+	- Workspace browser / code completion
+		- we might make this a bit less pro-active:
+			- only objects directly on the search path need to be fetched at once
+			- children of these objects do not need to be investigated until we first try to access a child of the object.
+			- i.e. RContainerobject::children() should handle fetching the child structure (numChildren() should probably be populated pro-actively).
+			- isParentOf() should not be affected, as this can only be true for a child object that has previously been investigated
+			- need to make sure, completions are not blocking
 	- Handling fonts:
 		- http://sourceforge.net/mailarchive/forum.php?thread_id=31631211&forum_id=12970
 	- Look at package odfWeave, and find out, how to use this

Modified: branches/release_branch_0.4.8/debian/changelog
===================================================================
--- branches/release_branch_0.4.8/debian/changelog	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/debian/changelog	2007-10-25 17:39:00 UTC (rev 2128)
@@ -1,3 +1,11 @@
+rkward (0.4.9-1) unstable; urgency=low
+
+  * new upstream release
+  * document --disable-stack-check and --debugger options in the manual page
+	TODO!
+
+ -- Thomas Friedrichsmeier <tfry at users.sourceforge.net>  Xxx, XX Xxx 2007 13:30:00 +0200
+
 rkward (0.4.8-1) unstable; urgency=low
 
   * new upstream release

Modified: branches/release_branch_0.4.8/debian/rkward.1
===================================================================
--- branches/release_branch_0.4.8/debian/rkward.1	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/debian/rkward.1	2007-10-25 17:39:00 UTC (rev 2128)
@@ -40,6 +40,12 @@
 .TP
 .B \-\-debug-flags <flags>
 Allows to configure, which sections of code to debug. Flags are given as a binary number. Refer to the source files for documentation, as this really is an internal option
+.TP
+.B \-\-debugger <command>
+Run RKWard through the specified debugger command. To add command line options to the debugger command, enclose them in single quotes ('') together with the command.
+.TP
+.B \-\-disable-stack-check
+Disable the R C stack checking mechanism. If you see the error message "C stack usage too close to the limit", this option may serve as a workaround.
 .SH SEE ALSO
 .BR R (1),
 .br

Modified: branches/release_branch_0.4.8/rkward/main.cpp
===================================================================
--- branches/release_branch_0.4.8/rkward/main.cpp	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/main.cpp	2007-10-25 17:39:00 UTC (rev 2128)
@@ -74,6 +74,7 @@
   { "+[File]", I18N_NOOP ("file to open"), 0 },
   { "debug-level <level>", I18N_NOOP ("Verbosity of debug messages (0-5)"), "2"}, 
   { "debug-flags <flags>", I18N_NOOP ("Mask for components to debug (see debug.h)"), "8191" }, 
+  { "debugger <command>", I18N_NOOP ("Debugger (enclose any debugger arguments in single quotes ('') together with the command)"), ""}, 
   { "disable-stack-check", I18N_NOOP ("Disable R C stack checking"), 0 }, 
   { 0, 0, 0 }
   // INSERT YOUR COMMANDLINE OPTIONS HERE
@@ -108,6 +109,9 @@
 	KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 	RK_Debug_Level = 5 - QString (args->getOption ("debug-level")).toInt ();
 	RK_Debug_Flags = QString (args->getOption ("debug-flags")).toInt ();
+	if (!args->getOption ("debugger").isEmpty ()) {
+		RK_DO (qDebug ("--debugger option should have been handled by wrapper script. Ignoring."), ALL, DL_ERROR);
+	}
 
 	RKWardStartupOptions *stoptions = new RKWardStartupOptions;
 	KURL *open_url = 0;

Modified: branches/release_branch_0.4.8/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- branches/release_branch_0.4.8/rkward/plugin/rkcomponentproperties.cpp	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/plugin/rkcomponentproperties.cpp	2007-10-25 17:39:00 UTC (rev 2128)
@@ -2,7 +2,7 @@
                           rkcomponentproperties  -  description
                              -------------------
     begin                : Fri Nov 25 2005
-    copyright            : (C) 2005, 2006 by Thomas Friedrichsmeier
+    copyright            : (C) 2005, 2006, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -713,9 +713,10 @@
 	ObjectList::const_iterator cit = newlist.begin ();
 	while (cit != newlist.end ()) {
 		if (!object_list.contains (*cit)) {
-			if (isObjectValid (*cit));
-			object_list.append (*cit);
-			changes = true;
+			if (isObjectValid (*cit)) {
+				object_list.append (*cit);
+				changes = true;
+			}
 		}
 		++cit;
 	}
@@ -769,6 +770,7 @@
 RObject *RKComponentPropertyRObjects::objectValue () {
 	RK_TRACE (PLUGIN);
 
+	if (object_list.empty ()) return 0;
 	return (object_list.first ());
 }
 

Modified: branches/release_branch_0.4.8/rkward/plugin/rkvarslot.cpp
===================================================================
--- branches/release_branch_0.4.8/rkward/plugin/rkvarslot.cpp	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/plugin/rkvarslot.cpp	2007-10-25 17:39:00 UTC (rev 2128)
@@ -2,7 +2,7 @@
                           rkvarslot.cpp  -  description
                              -------------------
     begin                : Thu Nov 7 2002
-    copyright            : (C) 2002 by Thomas Friedrichsmeier
+    copyright            : (C) 2002, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -175,8 +175,8 @@
 	if (add_mode) {
 		if (multi) {
 			ObjectList objlist = source->objectList ();
-			ObjectList::const_iterator it = objlist.begin ();
-			while (it != objlist.end ()) {
+			ObjectList::const_iterator it = objlist.constBegin ();
+			while (it != objlist.constEnd ()) {
 				available->addObjectValue (*it);
 				++it;
 			}

Modified: branches/release_branch_0.4.8/rkward/plugins/analysis/crosstab.php
===================================================================
--- branches/release_branch_0.4.8/rkward/plugins/analysis/crosstab.php	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/plugins/analysis/crosstab.php	2007-10-25 17:39:00 UTC (rev 2128)
@@ -1,8 +1,5 @@
 <?
 function preprocess () {
-?>
-require(xtable)
-<?
 }
 	
 function calculate () {
@@ -47,7 +44,7 @@
 	if ($final) { ?>
 for (i in 1:length (results)) {
 	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']]))
-	rk.print (xtable (cbind (results[[i]]), digits=0))
+	rk.print (results[[i]])
 <?		if (getRK_val ("chisq") == "TRUE") { ?>
 
 	rk.header ("Pearson's Chi Square Test for Crosstabs", list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']], "Method", chisquares[[i]][["method"]]))

Modified: branches/release_branch_0.4.8/rkward/plugins/analysis/moments/moment.php
===================================================================
--- branches/release_branch_0.4.8/rkward/plugins/analysis/moments/moment.php	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/plugins/analysis/moments/moment.php	2007-10-25 17:39:00 UTC (rev 2128)
@@ -15,7 +15,7 @@
 	var <- eval (objects[[i]], envir=globalenv ())
 	results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
 
-	try (results[i, 'Moment'] <- moment (var, central = <? getRK ("central"); ?>, absolute = <? getRK ("absolute"); ?>, na.rm = <? getRK ("narm"); ?>))
+	try (results[i, 'Moment'] <- moment (var, order = <? getRK ("order"); ?>, central = <? getRK ("central"); ?>, absolute = <? getRK ("absolute"); ?>, na.rm = <? getRK ("narm"); ?>))
 <?	if (getRK_val ("length")) { ?>
 
 	results[i, 'Length'] <- length (var)
@@ -28,7 +28,7 @@
 function printout () {
 ?>
 rk.header ("Statistical Moment",
-	parameters=list ("Compute central moments", "<? getRK ("central"); ?>","Compute absolute moments", "<? getRK ("absolute"); ?>", "Remove missing values", "<? getRK ("narm"); ?>"))
+	parameters=list ("Order", "<? getRK ("order"); ?>", "Compute central moments", "<? getRK ("central"); ?>", "Compute absolute moments", "<? getRK ("absolute"); ?>", "Remove missing values", "<? getRK ("narm"); ?>"))
 rk.results (results)
 <?
 }

Modified: branches/release_branch_0.4.8/rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- branches/release_branch_0.4.8/rkward/rbackend/rkstructuregetter.cpp	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/rbackend/rkstructuregetter.cpp	2007-10-25 17:39:00 UTC (rev 2128)
@@ -282,7 +282,7 @@
 
 		SEXP meta_s = callSimpleFun (get_meta_fun, value, R_GlobalEnv);
 		PROTECT (meta_s);
-		metadata->data = SEXPToStringList (classes_s, &count);
+		metadata->data = SEXPToStringList (meta_s, &count);
 		metadata->length = count;
 		UNPROTECT (1);	/* meta_s */
 	} else {

Modified: branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/DESCRIPTION
===================================================================
--- branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/DESCRIPTION	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/DESCRIPTION	2007-10-25 17:39:00 UTC (rev 2128)
@@ -1,6 +1,6 @@
 Package: rkward
 Title: Provides some helper functions for the RKWard frontend
-Version: 0.4.8
+Version: 0.4.8.1
 Author: Thomas Friedrichsmeier and the RKWard Team
 Description: Most of the functions in here are really only needed for the internal communication between RKWard and R. There are also a few functions, which allow access to RKWard or RKWard specifics. Most is not implemented, yet.
 Maintainer: RKWard-devel mailing list <rkward-devel at lists.sourceforge.net>

Modified: branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/R/internal.R	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/rbackend/rpackages/rkward/R/internal.R	2007-10-25 17:39:00 UTC (rev 2128)
@@ -167,26 +167,47 @@
 	}
 }
 
-".rk.make.watch.f" <- function (k) {
-	# we need to make sure, the functions we use are *not* looked up as symbols in .GlobalEnv.
-	# else, for instance, if the user names a symbol "missing", and we try to resolve it in the
-	# wrapper function below, evaluation would recurse to look up "missing" in the .GlobalEnv
-	# due to the call to "if (!missing(value))".
-	get <- base::get
-	missing <- base::missing
-	assign <- base::assign
-	.rk.do.call <- rkward::.rk.do.call
-	invisible <- base::invisible
-
-	function (value) {
-		if (!missing (value)) {
-			assign (k, value, envir=.rk.watched.symbols)
-			.rk.do.call ("ws", k);
-			invisible (value)
-		} else {
-			get (k, envir=.rk.watched.symbols)
+if (compareVersion (paste (R.version$major, R.version$minor, sep="."), "2.4.0") >= 0) {
+	".rk.make.watch.f" <- function (k) {
+		# we need to make sure, the functions we use are *not* looked up as symbols in .GlobalEnv.
+		# else, for instance, if the user names a symbol "missing", and we try to resolve it in the
+		# wrapper function below, evaluation would recurse to look up "missing" in the .GlobalEnv
+		# due to the call to "if (!missing(value))".
+		get <- base::get
+		missing <- base::missing
+		assign <- base::assign
+		.rk.do.call <- rkward::.rk.do.call
+		invisible <- base::invisible
+	
+		function (value) {
+			if (!missing (value)) {
+				assign (k, value, envir=.rk.watched.symbols)
+				.rk.do.call ("ws", k);
+				invisible (value)
+			} else {
+				get (k, envir=.rk.watched.symbols)
+			}
 		}
 	}
+} else {
+	# see above, but '::' operator was more picky in R < 2.4
+	".rk.make.watch.f" <- function (k) {
+		get <- base::get
+		missing <- base::missing
+		assign <- base::assign
+		.rk.do.call <- get (".rk.do.call", envir=as.environment ("package:rkward"))
+		invisible <- base::invisible
+	
+		function (value) {
+			if (!missing (value)) {
+				assign (k, value, envir=.rk.watched.symbols)
+				.rk.do.call ("ws", k);
+				invisible (value)
+			} else {
+				get (k, envir=.rk.watched.symbols)
+			}
+		}
+	}
 }
 
 ".rk.watch.symbol" <- function (k) {

Modified: branches/release_branch_0.4.8/rkward/rkward.sh.template
===================================================================
--- branches/release_branch_0.4.8/rkward/rkward.sh.template	2007-10-25 17:30:48 UTC (rev 2127)
+++ branches/release_branch_0.4.8/rkward/rkward.sh.template	2007-10-25 17:39:00 UTC (rev 2128)
@@ -41,8 +41,32 @@
   echo "Warning: unsetting LC_ALL"
 fi
 
+# handle --debugger argument (if any)
+# the loop partially copied from the R wrapper script
+error () {
+  echo "ERROR: $*" >&2
+  exit 1
+}
+
+debugger=
+args=
+while test -n "${1}"; do
+  case ${1} in
+    --debugger)
+      if test -n "`echo ${2} | sed 's/^-.*//'`"; then
+        debugger="${2}"; shift
+      else
+        error "option '${1}' requires an argument"
+      fi
+      ;;
+    *)
+      args="${args} ${1}" ;;
+  esac
+  shift
+done
+
 ## set LC_NUMERIC to "C"
 export LC_NUMERIC="C"
 
 ## Start rkward. Running through R CMD to set all the relevant R enviroment variables
-exec $R_binary CMD $0.bin "$@"
+exec $R_binary CMD $debugger $0.bin ${args}


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