[rkward-cvs] SF.net SVN: rkward:[3308] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Dec 23 11:42:20 UTC 2010


Revision: 3308
          http://rkward.svn.sourceforge.net/rkward/?rev=3308&view=rev
Author:   tfry
Date:     2010-12-23 11:42:20 +0000 (Thu, 23 Dec 2010)

Log Message:
-----------
Keep levels-info after conversion to factor.

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/core/rkvariable.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2010-12-23 09:39:45 UTC (rev 3307)
+++ trunk/rkward/ChangeLog	2010-12-23 11:42:20 UTC (rev 3308)
@@ -1,3 +1,4 @@
+- Fixed: Converting a variable to factor in the editor would drop existing levels, silently, and lead to NAs
 - Fixed: Cursor would keep jumping to the end, when typing a filename in the filename selection field in plugins
 - Fixed: Submit button would not become enabled in "Basic Statistics" plugin
 - Moved automated testing framework moved to a dedicated R package "rkwardtests", and added documentation

Modified: trunk/rkward/rkward/core/rkvariable.cpp
===================================================================
--- trunk/rkward/rkward/core/rkvariable.cpp	2010-12-23 09:39:45 UTC (rev 3307)
+++ trunk/rkward/rkward/core/rkvariable.cpp	2010-12-23 11:42:20 UTC (rev 3308)
@@ -100,6 +100,7 @@
 			else if (new_type == RObject::DataFactor) command += "as.factor";
 			command += ")";
 			RKGlobals::rInterface ()->issueCommand (command, RCommand::App | RCommand::Sync, QString::null);
+			if (new_type == RObject::DataFactor) writeValueLabels (0);		// as.factor resets the "levels"-attribute!
 
 			syncDataToR ();
 		}


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