Seth Falcon
2006-Aug-30 15:48 UTC
[Rd] Duplicated definition of helper in available.packages
Hi, The .checkRversion helper function is defined twice in available.packages. I'm pretty sure one definition will suffice. Untested patch below. + seth diff --git a/src/library/utils/R/packages.R b/src/library/utils/R/packages.R index 0b84f02..5184992 100644 --- a/src/library/utils/R/packages.R +++ b/src/library/utils/R/packages.R @@ -86,13 +86,6 @@ available.packages <- } ## ignore packages which don't fit our version of R if(length(res)) { - .checkRversion <- function(x) { - if(is.na(xx <- x["Depends"])) return(TRUE) - xx <- tools:::.split_dependencies(xx) - if(length(z <- xx[["R"]]) > 1) - eval(parse(text=paste("currentR", z$op, "z$version"))) - else TRUE - } currentR <- getRversion() res <- res[apply(res, 1, .checkRversion), , drop=FALSE] }