[Sciviews-commits] r253 - in pkg/svMisc: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 28 23:41:02 CEST 2010


Author: phgrosjean
Date: 2010-03-28 23:41:01 +0200 (Sun, 28 Mar 2010)
New Revision: 253

Modified:
   pkg/svMisc/DESCRIPTION
   pkg/svMisc/NEWS
   pkg/svMisc/R/descFun.R
Log:
Correction of a bug in descArgs() with function that use the '...' argument

Modified: pkg/svMisc/DESCRIPTION
===================================================================
--- pkg/svMisc/DESCRIPTION	2010-03-18 15:06:27 UTC (rev 252)
+++ pkg/svMisc/DESCRIPTION	2010-03-28 21:41:01 UTC (rev 253)
@@ -4,8 +4,8 @@
 Imports: utils, methods
 Depends: R (>= 2.6.0), tools
 Description: Supporting functions for the GUI API (various utilitary functions)
-Version: 0.9-56
-Date: 2009-10-26
+Version: 0.9-57
+Date: 2010-03-28
 Author: Philippe Grosjean, Romain Francois & Kamil Barton
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
 License: GPL (>= 2)

Modified: pkg/svMisc/NEWS
===================================================================
--- pkg/svMisc/NEWS	2010-03-18 15:06:27 UTC (rev 252)
+++ pkg/svMisc/NEWS	2010-03-28 21:41:01 UTC (rev 253)
@@ -1,5 +1,12 @@
 = svMisc News
 
+== Changes in svMisc 0.9-57
+
+* A bug in descArgs() with R >= 2.10 did not allowed to gest arguments
+  description for functions usnig the '...' argument. Thanks to Diego Zardetto
+  for pointing this bug.
+  
+
 == Changes in svMisc 0.9-56
 
 * Temporary code to disable index.search() in devel R 2.11 in isHelp() and

Modified: pkg/svMisc/R/descFun.R
===================================================================
--- pkg/svMisc/R/descFun.R	2010-03-18 15:06:27 UTC (rev 252)
+++ pkg/svMisc/R/descFun.R	2010-03-28 21:41:01 UTC (rev 253)
@@ -106,7 +106,12 @@
     arguments <- rd[[which(tags == "arguments")[1]]]
     items <- arguments[RdTags(arguments) == "\\item"]
     descriptions <- do.call(rbind, lapply(items, function (item) {
-    	names <- strsplit(item[[1]][[1]], "\\s*,\\s*", perl = TRUE)[[1]]
+		names <- try(strsplit(item[[1]][[1]], "\\s*,\\s*", perl = TRUE)[[1]],
+			silent = TRUE)
+		if (inherits(names, "try-error")) {
+			# This happens with the "..." argument
+			names <- "..."
+		}
     	content <- paste(rapply(item[-1], as.character), collapse = "")
     	cbind(names, rep.int(content, length(names)))
     }))



More information about the Sciviews-commits mailing list