[Roxygen-commits] r55 - in pkg: R sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jul 19 23:07:35 CEST 2008


Author: pcd
Date: 2008-07-19 23:07:34 +0200 (Sat, 19 Jul 2008)
New Revision: 55

Modified:
   pkg/R/functional.R
   pkg/R/namespace.R
   pkg/R/string.R
   pkg/sandbox/namespace.R
Log:
namespace using strmap


Modified: pkg/R/functional.R
===================================================================
--- pkg/R/functional.R	2008-07-19 21:07:06 UTC (rev 54)
+++ pkg/R/functional.R	2008-07-19 21:07:34 UTC (rev 55)
@@ -17,3 +17,6 @@
                        fs,
                        ...)
 }
+
+## Is concatenation benign?
+Identity <- function(...) c(...)

Modified: pkg/R/namespace.R
===================================================================
--- pkg/R/namespace.R	2008-07-19 21:07:06 UTC (rev 54)
+++ pkg/R/namespace.R	2008-07-19 21:07:34 UTC (rev 55)
@@ -1,7 +1,7 @@
-#' @include string.R
+#' @include string.R functional.R
 namespace <- function(partita) {
   parse.default <- function(procedure, parameters)
-    sprintf('%s(%s)', procedure, gsub(' +', ', ', parameters))
+    sprintf('%s(%s)', procedure, strmap(Identity, ', ', parameters))
   
   parse.exportClass <- function(procedure, parameters)
     parse.default('exportClasses', parameters)

Modified: pkg/R/string.R
===================================================================
--- pkg/R/string.R	2008-07-19 21:07:06 UTC (rev 54)
+++ pkg/R/string.R	2008-07-19 21:07:34 UTC (rev 55)
@@ -20,14 +20,6 @@
 
 nwords <- function(string) length(words(string))
 
-## word.ref <- function(string, n) {
-##   words <- words(string)
-##   start <- words[[n]]
-##   length <- attributes(words)$match.length[[n]]
-##   end <- start + length - 1
-##   list(start=start, end=end)
-## }
-
 word.ref <- function(string, n) {
   continue <- function(string, n, init) {
     word <- regexpr(MATTER, string)

Modified: pkg/sandbox/namespace.R
===================================================================
--- pkg/sandbox/namespace.R	2008-07-19 21:07:06 UTC (rev 54)
+++ pkg/sandbox/namespace.R	2008-07-19 21:07:34 UTC (rev 55)
@@ -1,7 +1,7 @@
 source('../R/functional.R')
 source('../R/list.R')
+source('../R/string.R')
 source('../R/parse.R')
-source('../R/roclet.R')
 source('../R/namespace.R')
 
 FILES <- list('example-function-mcpi.R',



More information about the Roxygen-commits mailing list