[Rd] Typo in tools:::format.check_Rd_metadata()

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Tue, 29 Mar 2011 10:31:10 -0700


Hi,

With R version 2.13.0 alpha (2011-03-24 r55004), 'R CMD check' will produce the following output on some packages:

This is happening on packages that contain duplicated \name or \alias tags in their Rd files. 'R CMD check' is able to detect this situation but is not able to display the warning message correctly because of a typo in the tools:::format.check_Rd_metadata() function:

   format.check_Rd_metadata <-
   function(x, ...)
   {

     c(character(),
       if(length(bad <- x$files_with_duplicated_name)) {
           unlist(lapply(names(bad)),
                  function(nm) {
                      c(gettextf("Rd files with duplicated name '%s':",
                                 nm),
                        .pretty_format(bad[[nm]]))

})
}, if(length(bad <- x$files_with_duplicated_aliases)) { unlist(lapply(names(bad)), function(nm) { c(gettextf("Rd files with duplicated alias '%s':", nm), .pretty_format(bad[[nm]]))
})
})

   }

Note the closing parentesis for the lapply() calls? Looks like it was intended to be something like:

           unlist(lapply(names(bad),
                         function(nm) {
                             c(gettextf("Rd files with duplicated name 
'%s':",
                                        nm),
                               .pretty_format(bad[[nm]]))
                         }))

Cheers,
H.

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages_at_fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 29 Mar 2011 - 17:34:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Mar 2011 - 18:40:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive