Skip to content

Commit 45a588b

Browse files
author
hornik
committed
Tweaks.
git-svn-id: https://svn.r-project.org/R/trunk@88318 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 211478d commit 45a588b

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/library/tools/R/CRANtools.R

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ CRAN_package_check_URL <- function(p)
757757
p)
758758

759759
BioC_package_db <-
760-
function()
760+
function(remap = TRUE)
761761
{
762762
urls <- .get_standard_repository_URLs()
763763
urls <- urls[startsWith(names(urls), "BioC")]
@@ -767,8 +767,18 @@ function()
767767
on.exit(close(con))
768768
read.dcf(con)
769769
})
770-
Reduce(function(u, v) merge(u, v, all = TRUE),
771-
lapply(info,
772-
as.data.frame,
773-
stringsAsFactors = FALSE))
770+
db <- Reduce(function(u, v) merge(u, v, all = TRUE),
771+
lapply(info,
772+
as.data.frame,
773+
stringsAsFactors = FALSE))
774+
if(remap) {
775+
## Map BioC reverse dependency names to CRAN ones.
776+
biocrevnames <- c(dependsOnMe = "Reverse depends",
777+
importsMe = "Reverse imports",
778+
linksToMe = "Reverse linking to",
779+
suggestsMe = "Reverse suggests")
780+
pos <- match(colnames(db), names(biocrevnames), nomatch = 0L)
781+
colnames(db)[pos > 0] <- biocrevnames[pos]
782+
}
783+
db
774784
}

0 commit comments

Comments
 (0)