[rkward-cvs] SF.net SVN: rkward:[3432] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ internal.R

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Feb 9 17:52:29 UTC 2011


Revision: 3432
          http://rkward.svn.sourceforge.net/rkward/?rev=3432&view=rev
Author:   tfry
Date:     2011-02-09 17:52:29 +0000 (Wed, 09 Feb 2011)

Log Message:
-----------
Prune the '.rk.invalid.fields' attribute when removing the last invalid value.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R	2011-02-09 11:02:03 UTC (rev 3431)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R	2011-02-09 17:52:29 UTC (rev 3432)
@@ -7,10 +7,11 @@
 	eval (substitute (attr (x, ".rk.meta") <<- m))
 }
 
-".rk.set.invalid.field" <- function (x, r, d) {
+".rk.set.invalid.field" <- function (x, row, value) {
 	l <- attr (x, ".rk.invalid.fields");
 	if (is.null (l)) l <- list ();
-	l[[as.character(r)]] <- d;
+	l[[as.character(row)]] <- value;
+	if (length (l) == 0) l <- NULL
 	eval (substitute (attr (x, ".rk.invalid.fields") <<- l))
 }
 


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