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

tfry at users.sf.net tfry at users.sf.net
Mon Oct 6 17:20:20 UTC 2014


Revision: 4879
          http://sourceforge.net/p/rkward/code/4879
Author:   tfry
Date:     2014-10-06 17:20:19 +0000 (Mon, 06 Oct 2014)
Log Message:
-----------
Fix non-copied default values in recode categorical

Modified Paths:
--------------
    trunk/rkward/VERSION.cmake
    trunk/rkward/rkward/plugins/data/recode_categorical.js
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/ver.R
    trunk/rkward/tests/data_plugin_tests/recode_categorical.rkcommands.R

Modified: trunk/rkward/VERSION.cmake
===================================================================
--- trunk/rkward/VERSION.cmake	2014-10-06 16:56:09 UTC (rev 4878)
+++ trunk/rkward/VERSION.cmake	2014-10-06 17:20:19 UTC (rev 4879)
@@ -1,3 +1,3 @@
 # DO NOT CHANGE THIS FILE MANUALLY!
 # It will be overwritten by scripts/set_dist_version.sh
-SET(RKVERSION_NUMBER 0.6.1z+0.6.2+test3)
+SET(RKVERSION_NUMBER 0.6.1z+0.6.2+test4)

Modified: trunk/rkward/rkward/plugins/data/recode_categorical.js
===================================================================
--- trunk/rkward/rkward/plugins/data/recode_categorical.js	2014-10-06 16:56:09 UTC (rev 4878)
+++ trunk/rkward/rkward/plugins/data/recode_categorical.js	2014-10-06 17:20:19 UTC (rev 4879)
@@ -8,7 +8,7 @@
 	var datamode = getString ("datamode");
 	var is_factor = datamode == "factor";
 	var is_character = datamode == "character";
-	var default_values = getString ("other");
+	var default_values = getString ("other.string");
 
 	// initialize output vector to defaults
 	echo ('input <- ' + input + '\n');
@@ -21,7 +21,7 @@
 	if (default_values == "copy") {
 		echo (input + ")\n");
 	} else {
-		echo ('rep (' + default_values == "na" ? 'NA' : getString ("other_custom.valuequoted") + ', length.out = length (' + input + '))\n');
+		echo ('rep (' + ((default_values == "na") ? 'NA' : getString ("other_custom.valuequoted")) + ', length.out = length (' + input + ')))\n');
 	}
 
 	// Make replacements

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/ver.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/ver.R	2014-10-06 16:56:09 UTC (rev 4878)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/ver.R	2014-10-06 17:20:19 UTC (rev 4879)
@@ -3,4 +3,4 @@
 # rkward/SetVersionNumber.cmake
 
 #' @export
-".rk.app.version" <- "0.6.1z+0.6.2+test3"
+".rk.app.version" <- "0.6.1z+0.6.2+test4"

Modified: trunk/rkward/tests/data_plugin_tests/recode_categorical.rkcommands.R
===================================================================
--- trunk/rkward/tests/data_plugin_tests/recode_categorical.rkcommands.R	2014-10-06 16:56:09 UTC (rev 4878)
+++ trunk/rkward/tests/data_plugin_tests/recode_categorical.rkcommands.R	2014-10-06 17:20:19 UTC (rev 4879)
@@ -26,7 +26,7 @@
 local({
 ## Compute
 input <- withnas
-recoded <- as.logical ("", length.out = length (withnas))
+recoded <- as.logical (rep (NA, length.out = length (withnas)))
 recoded[input %in% c("2","3","4","5","6","7","8","9","10")] <- FALSE
 recoded[input %in% c("9","10")] <- NA
 recoded[is.na (input)] <- TRUE





More information about the rkward-tracker mailing list