[Roxygen-commits] r244 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 13 01:45:22 CET 2010


Author: pcd
Date: 2010-03-13 01:45:22 +0100 (Sat, 13 Mar 2010)
New Revision: 244

Modified:
   pkg/R/Rd.R
Log:
otherwise, we get an error with closures

Modified: pkg/R/Rd.R
===================================================================
--- pkg/R/Rd.R	2010-02-26 07:36:39 UTC (rev 243)
+++ pkg/R/Rd.R	2010-03-13 00:45:22 UTC (rev 244)
@@ -299,7 +299,12 @@
   parse.formals <- function(partitum) {
     formals <- partitum$formals
     if (!is.null(formals)) {
-      name.defaults <- zip.c(names(formals), formals)
+      ## name.defaults <- zip.c(names(formals), formals)
+      name.defaults <-
+        zip.c(names(formals),
+              Map(function(formal) tryCatch(toString(formal),
+                                            error=function(e) '<closure>'),
+                  formals))
       args <-
         do.call(paste, c(Map(function(name.default) {
           name <- car(name.default)



More information about the Roxygen-commits mailing list