[rkward-cvs] SF.net SVN: rkward: [1980] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ public.R

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Sep 20 22:01:31 UTC 2007


Revision: 1980
          http://rkward.svn.sourceforge.net/rkward/?rev=1980&view=rev
Author:   tfry
Date:     2007-09-20 15:01:31 -0700 (Thu, 20 Sep 2007)

Log Message:
-----------
FOR 0.4.8: Make rk.get.description() print something reasonable for objects in a package environment

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

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2007-09-20 18:42:51 UTC (rev 1979)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2007-09-20 22:01:31 UTC (rev 1980)
@@ -29,13 +29,14 @@
 }
 
 # make a short name from the given arg (a character string)
+# e.g. return "b" for a[["b"]] (but 'a::"b"' for a::"b"
 ".rk.make.short.name" <- function (x) {
-	splt <- strsplit (x, "\"")[[1]]
+	splt <- strsplit (x, "[[\"", fixed=TRUE)[[1]]
 	spltlen <- length (splt)
 	if (spltlen == 1) {
 		splt[1]
 	} else {
-		splt[spltlen - 1]
+		strsplit (splt[spltlen], "\"]]", fixed=TRUE)[[1]][1]
 	}
 }
 


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