[Roxygen-devel] fix for aliases

meik michalke meik.michalke at uni-duesseldorf.de
Thu Sep 1 19:39:37 CEST 2011


hi,

as R CMD check revealed to me, the values of \alias{} must not be quoted. 
otherwise you run into warnings regarding undocumented stuff.

here's another fix, in two patches:

<patch1>
--- roclet-namespace.R.orig     2011-08-29 23:52:59.648650390 +0200
+++ roclet-namespace.R  2011-09-01 19:25:54.228446954 +0200
@@ -182,9 +182,15 @@
   unlist(lapply(matches, f, tag = tag, all = partitum), use.names = FALSE)
 }
   
-words <- function(x) {
-  quote_if_needed(str_split(str_trim(x), "\\s+")[[1]])
+words <- function(x, quote=TRUE) {
+  x.trimmed <- str_split(str_trim(x), "\\s+")[[1]]
+  if(isTRUE(quote)){
+    return(quote_if_needed(x.trimmed))
+  } else {
+    return(x.trimmed)
+  }
 }
+
 is.syntactic <- function(x) make.names(x) == x
 has.quotes <- function(x) str_detect(x, "'|\"")
 quote_if_needed <- function(x) {
</patch1>

<patch2>
--- roclet-rd.R.orig    2011-07-28 20:59:24.000000000 +0200
+++ roclet-rd.R 2011-09-01 19:27:26.976672899 +0200
@@ -333,7 +333,7 @@
   add_tag(rd, process_description(partitum, base_path))
 
   add_tag(rd, process_had_tag(partitum, 'aliases', function(tag, param) {
-      new_tag('alias', words(param))
+      new_tag('alias', words(param, quote=FALSE))
     }))
   add_tag(rd, process.usage(partitum))
   add_tag(rd, process.arguments(partitum))
</patch2>


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20110901/89b3dca8/attachment.pgp>


More information about the Roxygen-devel mailing list