Skip to content

Commit d84daa4

Browse files
author
hornik
committed
Add CRAN_check_results_diff().
git-svn-id: https://svn.r-project.org/R/trunk@88959 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5cf665b commit d84daa4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/library/tools/R/CRANtools.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,32 @@ function(flavors = NULL)
220220
db
221221
}
222222

223+
CRAN_check_results_diff <-
224+
function(f1, f2)
225+
{
226+
x <- CRAN_check_results()
227+
s1 <- x[x$Flavor == f1, ]
228+
s2 <- x[x$Flavor == f2, ]
229+
s1 <- s1[c("Package", "Version", "Status")]
230+
s2 <- s2[c("Package", "Version", "Status")]
231+
db <- merge(s1, s2, by = 1, all = TRUE)
232+
row.names(db) <- db$Package
233+
db <- db[, c("Version.x", "Status.x", "Version.y", "Status.y")]
234+
isc <- (is.na(db$Status.x) |
235+
is.na(db$Status.y) |
236+
(db$Status.x != db$Status.y)) # Status change.
237+
ivc <- (is.na(db$Version.x) |
238+
is.na(db$Version.y) |
239+
(db$Version.x != db$Version.y)) # Version change.
240+
names(db) <- c("V1", "S1", "V2", "S2")
241+
db <- cbind("S" = ifelse(isc, "*", ""),
242+
"V" = ifelse(ivc, "*", ""),
243+
db)
244+
db <- db[c(which(isc & !ivc), which(isc & ivc), which(!isc & ivc)),
245+
c("S", "V", "S1", "S2", "V1", "V2")]
246+
db
247+
}
248+
223249
CRAN_check_details <-
224250
function(flavors = NULL)
225251
{

0 commit comments

Comments
 (0)