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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 12 12:00:31 UTC 2006


Revision: 857
          http://svn.sourceforge.net/rkward/?rev=857&view=rev
Author:   tfry
Date:     2006-10-12 05:00:27 -0700 (Thu, 12 Oct 2006)

Log Message:
-----------
significant speedup of function argvalue fetching. Not entirely correct, yet, in that 
special characters (such as tab, newline, etc.) are not deparsed, and need to be fixed up in rkward space.
Should still be a lot faster, however.

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	2006-10-11 22:31:57 UTC (rev 856)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R	2006-10-12 12:00:27 UTC (rev 857)
@@ -286,7 +286,10 @@
 		return (invisible (list (name, type, classes, meta, dims, sub)))
 	} else if (fun) {	# a function
 		argnames <- as.character (names (formals (x)))
-		argvalues <- as.character (lapply (formals (x), function (v) deparse (v)))
+		argvalues <- as.character (lapply (formals (x), function (v) {
+					if (is.character (v)) return (paste ("\"", v, "\"", sep=""))
+					else return (v)
+				} ))
 		return (invisible (list (name, type, classes, meta, dims, argnames, argvalues)))
 	}
 	return (invisible (list (name, type, classes, meta, dims)))


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