Hi, With R version 2.13.0 alpha (2011-03-24 r55004), 'R CMD check' will produce the following output on some packages: * checking Rd metadata ... WARNING Error in is.function(FUN) : 'FUN' is missing Calls: print ... format.check_Rd_metadata -> unlist -> lapply -> match.fun Execution halted 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
On 29/03/2011 1:31 PM, Herv? Pag?s wrote:> Hi, > > With R version 2.13.0 alpha (2011-03-24 r55004), 'R CMD check' will > produce the following output on some packages: > > * checking Rd metadata ... WARNING > Error in is.function(FUN) : 'FUN' is missing > Calls: print ... format.check_Rd_metadata -> unlist -> lapply -> > match.fun > Execution halted > > 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. > >Thanks, will fix. Duncan Murdoch
Reasonably Related Threads
- Suggested Patch: Adding commas to list of packages after R CMD check
- Suggested Patch: Adding commas to list of packages after R CMD check
- [RFC PATCH] drm/nouveau/fb/ram/gk104: move assignment out of condition
- Reordenar una matriz con caracteres en cada celda
- Como calcular la media de una gran cantidad de flow.frame en un ciclo "for" ...