CRAN Package Check Results for Package Matrix

Last updated on 2020-12-31 00:46:48 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.3-0 189.89 360.51 550.40 OK
r-devel-linux-x86_64-debian-gcc 1.3-0 136.00 272.64 408.64 OK
r-devel-linux-x86_64-fedora-clang 1.3-0 690.61 OK
r-devel-linux-x86_64-fedora-gcc 1.3-0 674.60 OK
r-devel-windows-ix86+x86_64 1.2-18 369.00 465.00 834.00 ERROR
r-patched-linux-x86_64 1.3-0 153.45 345.21 498.66 OK
r-patched-solaris-x86 1.3-0 OK
r-release-linux-x86_64 1.3-0 146.91 345.47 492.38 OK
r-release-macos-x86_64 1.3-0 OK
r-release-windows-ix86+x86_64 1.2-18 366.00 484.00 850.00 OK
r-oldrel-macos-x86_64 1.3-0 OK
r-oldrel-windows-ix86+x86_64 1.3-0 227.00 380.00 607.00 OK

Additional issues

rchk

Check Details

Version: 1.2-18
Check: running examples for arch ‘i386’
Result: ERROR
    Running examples in 'Matrix-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: image-methods
    > ### Title: Methods for image() in Package 'Matrix'
    > ### Aliases: image-methods image,ANY-method image,CHMfactor-method
    > ### image,Matrix-method image,dgRMatrix-method image,dgCMatrix-method
    > ### image,dgTMatrix-method image,dsparseMatrix-method
    > ### image,lsparseMatrix-method image,nsparseMatrix-method
    > ### Keywords: methods hplot
    >
    > ### ** Examples
    >
    > showMethods(image)
    Function: image (package graphics)
    x="ANY"
    x="BunchKaufman"
     (inherited from: x="Matrix")
    x="CHMfactor"
    x="Matrix"
    x="dgCMatrix"
    x="dgRMatrix"
    x="dgTMatrix"
    x="dsCMatrix"
     (inherited from: x="dsparseMatrix")
    x="dsparseMatrix"
    x="dtCMatrix"
     (inherited from: x="dsparseMatrix")
    x="lsparseMatrix"
    x="nsparseMatrix"
    
    > ## If you want to see all the methods' implementations:
    > showMethods(image, incl=TRUE, inherit=FALSE)
    Function: image (package graphics)
    x="ANY"
    function (x, ...)
    UseMethod("image")
    
    
    x="CHMfactor"
    function (x, ...)
    image(as(as(x, "sparseMatrix"), "dgTMatrix"), ...)
    
    
    x="Matrix"
    function (x, ...)
    {
     x <- as(as(x, "sparseMatrix"), "dsparseMatrix")
     callGeneric()
    }
    
    
    x="dgCMatrix"
    function (x, ...)
    image(as(x, "dgTMatrix"), ...)
    
    
    x="dgRMatrix"
    function (x, ...)
    image(as(x, "TsparseMatrix"), ...)
    
    
    x="dgTMatrix"
    function (x, ...)
    {
     .local <- function (x, xlim = c(1, di[2]), ylim = c(di[1],
     1), aspect = "iso", sub = sprintf("Dimensions: %d x %d",
     di[1], di[2]), xlab = "Column", ylab = "Row", cuts = 15,
     useRaster = FALSE, useAbs = NULL, colorkey = !useAbs,
     col.regions = NULL, lwd = NULL, border.col = NULL, ...)
     {
     di <- x@Dim
     xx <- x@x
     if (length(xx) == 0 && length(x) > 0) {
     x@x <- 0
     x@i <- x@j <- 0L
     }
     if (missing(useAbs)) {
     useAbs <- if (length(xx))
     min(xx, na.rm = TRUE) >= 0
     else TRUE
     }
     else if (useAbs)
     xx <- abs(xx)
     if (is.null(col.regions))
     col.regions <- if (useAbs) {
     grey(seq(from = 0.7, to = 0, length = 100))
     }
     else {
     rx <- range(xx, finite = TRUE)
     nn <- 100
     n0 <- min(nn, max(0, round((0 - rx[1])/(rx[2] -
     rx[1]) * nn)))
     col.regions <- c(colorRampPalette(c("blue3",
     "gray80"))(n0), colorRampPalette(c("gray75",
     "red3"))(nn - n0))
     }
     if (!is.null(lwd) && !(is.numeric(lwd) && all(lwd >=
     0)))
     stop("'lwd' must be NULL or non-negative numeric")
     stopifnot(length(xlim) == 2, length(ylim) == 2)
     ylim <- sort(ylim, decreasing = TRUE)
     if (all(xlim == round(xlim)))
     xlim <- xlim + c(-0.5, +0.5)
     if (all(ylim == round(ylim)))
     ylim <- ylim + c(+0.5, -0.5)
     levelplot(xx ~ (x@j + 1L) * (x@i + 1L), sub = sub, xlab = xlab,
     ylab = ylab, xlim = xlim, ylim = ylim, aspect = aspect,
     colorkey = colorkey, col.regions = col.regions, cuts = cuts,
     par.settings = list(background = list(col = "transparent")),
     panel = if (useRaster)
     panel.levelplot.raster
     else function(x, y, z, subscripts, at, ..., col.regions) {
     x <- as.numeric(x[subscripts])
     y <- as.numeric(y[subscripts])
     numcol <- length(at) - 1
     num.r <- length(col.regions)
     col.regions <- if (num.r <= numcol)
     rep_len(col.regions, numcol)
     else col.regions[1 + ((1:numcol - 1) * (num.r -
     1))%/%(numcol - 1)]
     zcol <- rep.int(NA_integer_, length(z))
     for (i in seq_along(col.regions)) zcol[!is.na(x) &
     !is.na(y) & !is.na(z) & at[i] <= z & z < at[i +
     1]] <- i
     zcol <- zcol[subscripts]
     if (any(subscripts)) {
     if (is.null(lwd)) {
     wh <- grid::current.viewport()[c("width",
     "height")]
     wh <- c(grid::convertWidth(wh$width, "inches",
     valueOnly = TRUE), grid::convertHeight(wh$height,
     "inches", valueOnly = TRUE)) * par("cra")/par("cin")
     pSize <- wh/di
     pA <- prod(pSize)
     p1 <- min(pSize)
     lwd <- if (p1 < 2 || pA < 6)
     0.01
     else if (p1 >= 4)
     1
     else if (p1 > 3)
     0.5
     else 0.2
     Matrix.msg("rectangle size ", paste(round(pSize,
     1), collapse = " x "), " [pixels]; --> lwd :",
     formatC(lwd))
     }
     else stopifnot(is.numeric(lwd), all(lwd >=
     0))
     if (is.null(border.col) && lwd < 0.01)
     border.col <- NA
     grid.rect(x = x, y = y, width = 1, height = 1,
     default.units = "native", gp = gpar(fill = col.regions[zcol],
     lwd = lwd, col = border.col))
     }
     }, ...)
     }
     .local(x, ...)
    }
    
    
    x="dsparseMatrix"
    function (x, ...)
    image(as(x, "dgTMatrix"), ...)
    
    
    x="lsparseMatrix"
    function (x, ...)
    image(as(x, "dMatrix"), ...)
    
    
    x="nsparseMatrix"
    function (x, ...)
    image(as(x, "dMatrix"), ...)
    
    
    
    > ## Don't show:
    > ## warnings should not happen here, notably when print(<trellis>)
    > op <- options(warn = 2)
    > ## End(Don't show)
    > data(CAex)
    > image(CAex, main = "image(CAex)")
    > image(CAex, useAbs=TRUE, main = "image(CAex, useAbs=TRUE)")
    >
    > cCA <- Cholesky(crossprod(CAex), Imult = .01)
    > ## See ?print.trellis --- place two image() plots side by side:
    > print(image(cCA, main="Cholesky(crossprod(CAex), Imult = .01)"),
    + split=c(x=1,y=1,nx=2, ny=1), more=TRUE)
    > print(image(cCA, useAbs=TRUE),
    + split=c(x=2,y=1,nx=2,ny=1))
    >
    > data(USCounties)
    > image(USCounties)# huge
    > image(sign(USCounties))## just the pattern
    > # how the result looks, may depend heavily on
    > # the device, screen resolution, antialiasing etc
    > # e.g. x11(type="Xlib") may show very differently than cairo-based
    >
    > ## Drawing borders around each rectangle;
    > # again, viewing depends very much on the device:
    > image(USCounties[1:400,1:200], lwd=.1)
    > ## Using (xlim,ylim) has advantage : matrix dimension and (col/row) indices:
    > image(USCounties, c(1,200), c(1,400), lwd=.1)
    > image(USCounties, c(1,300), c(1,200), lwd=.5 )
    > image(USCounties, c(1,300), c(1,200), lwd=.01)
    > ## These 3 are all equivalent :
    > (I1 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE))
    > I2 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE, border.col=NA)
    > I3 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE, lwd=2, border.col=NA)
    > stopifnot(all.equal(I1, I2), all.equal(I2, I3))
    Error: I1 and I2 are not equal:
     Component "panel": Component "border.col": target is NULL, current is logical
    Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 1.2-18
Check: running examples for arch ‘x64’
Result: ERROR
    Running examples in 'Matrix-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: image-methods
    > ### Title: Methods for image() in Package 'Matrix'
    > ### Aliases: image-methods image,ANY-method image,CHMfactor-method
    > ### image,Matrix-method image,dgRMatrix-method image,dgCMatrix-method
    > ### image,dgTMatrix-method image,dsparseMatrix-method
    > ### image,lsparseMatrix-method image,nsparseMatrix-method
    > ### Keywords: methods hplot
    >
    > ### ** Examples
    >
    > showMethods(image)
    Function: image (package graphics)
    x="ANY"
    x="BunchKaufman"
     (inherited from: x="Matrix")
    x="CHMfactor"
    x="Matrix"
    x="dgCMatrix"
    x="dgRMatrix"
    x="dgTMatrix"
    x="dsCMatrix"
     (inherited from: x="dsparseMatrix")
    x="dsparseMatrix"
    x="dtCMatrix"
     (inherited from: x="dsparseMatrix")
    x="lsparseMatrix"
    x="nsparseMatrix"
    
    > ## If you want to see all the methods' implementations:
    > showMethods(image, incl=TRUE, inherit=FALSE)
    Function: image (package graphics)
    x="ANY"
    function (x, ...)
    UseMethod("image")
    
    
    x="CHMfactor"
    function (x, ...)
    image(as(as(x, "sparseMatrix"), "dgTMatrix"), ...)
    
    
    x="Matrix"
    function (x, ...)
    {
     x <- as(as(x, "sparseMatrix"), "dsparseMatrix")
     callGeneric()
    }
    
    
    x="dgCMatrix"
    function (x, ...)
    image(as(x, "dgTMatrix"), ...)
    
    
    x="dgRMatrix"
    function (x, ...)
    image(as(x, "TsparseMatrix"), ...)
    
    
    x="dgTMatrix"
    function (x, ...)
    {
     .local <- function (x, xlim = c(1, di[2]), ylim = c(di[1],
     1), aspect = "iso", sub = sprintf("Dimensions: %d x %d",
     di[1], di[2]), xlab = "Column", ylab = "Row", cuts = 15,
     useRaster = FALSE, useAbs = NULL, colorkey = !useAbs,
     col.regions = NULL, lwd = NULL, border.col = NULL, ...)
     {
     di <- x@Dim
     xx <- x@x
     if (length(xx) == 0 && length(x) > 0) {
     x@x <- 0
     x@i <- x@j <- 0L
     }
     if (missing(useAbs)) {
     useAbs <- if (length(xx))
     min(xx, na.rm = TRUE) >= 0
     else TRUE
     }
     else if (useAbs)
     xx <- abs(xx)
     if (is.null(col.regions))
     col.regions <- if (useAbs) {
     grey(seq(from = 0.7, to = 0, length = 100))
     }
     else {
     rx <- range(xx, finite = TRUE)
     nn <- 100
     n0 <- min(nn, max(0, round((0 - rx[1])/(rx[2] -
     rx[1]) * nn)))
     col.regions <- c(colorRampPalette(c("blue3",
     "gray80"))(n0), colorRampPalette(c("gray75",
     "red3"))(nn - n0))
     }
     if (!is.null(lwd) && !(is.numeric(lwd) && all(lwd >=
     0)))
     stop("'lwd' must be NULL or non-negative numeric")
     stopifnot(length(xlim) == 2, length(ylim) == 2)
     ylim <- sort(ylim, decreasing = TRUE)
     if (all(xlim == round(xlim)))
     xlim <- xlim + c(-0.5, +0.5)
     if (all(ylim == round(ylim)))
     ylim <- ylim + c(+0.5, -0.5)
     levelplot(xx ~ (x@j + 1L) * (x@i + 1L), sub = sub, xlab = xlab,
     ylab = ylab, xlim = xlim, ylim = ylim, aspect = aspect,
     colorkey = colorkey, col.regions = col.regions, cuts = cuts,
     par.settings = list(background = list(col = "transparent")),
     panel = if (useRaster)
     panel.levelplot.raster
     else function(x, y, z, subscripts, at, ..., col.regions) {
     x <- as.numeric(x[subscripts])
     y <- as.numeric(y[subscripts])
     numcol <- length(at) - 1
     num.r <- length(col.regions)
     col.regions <- if (num.r <= numcol)
     rep_len(col.regions, numcol)
     else col.regions[1 + ((1:numcol - 1) * (num.r -
     1))%/%(numcol - 1)]
     zcol <- rep.int(NA_integer_, length(z))
     for (i in seq_along(col.regions)) zcol[!is.na(x) &
     !is.na(y) & !is.na(z) & at[i] <= z & z < at[i +
     1]] <- i
     zcol <- zcol[subscripts]
     if (any(subscripts)) {
     if (is.null(lwd)) {
     wh <- grid::current.viewport()[c("width",
     "height")]
     wh <- c(grid::convertWidth(wh$width, "inches",
     valueOnly = TRUE), grid::convertHeight(wh$height,
     "inches", valueOnly = TRUE)) * par("cra")/par("cin")
     pSize <- wh/di
     pA <- prod(pSize)
     p1 <- min(pSize)
     lwd <- if (p1 < 2 || pA < 6)
     0.01
     else if (p1 >= 4)
     1
     else if (p1 > 3)
     0.5
     else 0.2
     Matrix.msg("rectangle size ", paste(round(pSize,
     1), collapse = " x "), " [pixels]; --> lwd :",
     formatC(lwd))
     }
     else stopifnot(is.numeric(lwd), all(lwd >=
     0))
     if (is.null(border.col) && lwd < 0.01)
     border.col <- NA
     grid.rect(x = x, y = y, width = 1, height = 1,
     default.units = "native", gp = gpar(fill = col.regions[zcol],
     lwd = lwd, col = border.col))
     }
     }, ...)
     }
     .local(x, ...)
    }
    
    
    x="dsparseMatrix"
    function (x, ...)
    image(as(x, "dgTMatrix"), ...)
    
    
    x="lsparseMatrix"
    function (x, ...)
    image(as(x, "dMatrix"), ...)
    
    
    x="nsparseMatrix"
    function (x, ...)
    image(as(x, "dMatrix"), ...)
    
    
    
    > ## Don't show:
    > ## warnings should not happen here, notably when print(<trellis>)
    > op <- options(warn = 2)
    > ## End(Don't show)
    > data(CAex)
    > image(CAex, main = "image(CAex)")
    > image(CAex, useAbs=TRUE, main = "image(CAex, useAbs=TRUE)")
    >
    > cCA <- Cholesky(crossprod(CAex), Imult = .01)
    > ## See ?print.trellis --- place two image() plots side by side:
    > print(image(cCA, main="Cholesky(crossprod(CAex), Imult = .01)"),
    + split=c(x=1,y=1,nx=2, ny=1), more=TRUE)
    > print(image(cCA, useAbs=TRUE),
    + split=c(x=2,y=1,nx=2,ny=1))
    >
    > data(USCounties)
    > image(USCounties)# huge
    > image(sign(USCounties))## just the pattern
    > # how the result looks, may depend heavily on
    > # the device, screen resolution, antialiasing etc
    > # e.g. x11(type="Xlib") may show very differently than cairo-based
    >
    > ## Drawing borders around each rectangle;
    > # again, viewing depends very much on the device:
    > image(USCounties[1:400,1:200], lwd=.1)
    > ## Using (xlim,ylim) has advantage : matrix dimension and (col/row) indices:
    > image(USCounties, c(1,200), c(1,400), lwd=.1)
    > image(USCounties, c(1,300), c(1,200), lwd=.5 )
    > image(USCounties, c(1,300), c(1,200), lwd=.01)
    > ## These 3 are all equivalent :
    > (I1 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE))
    > I2 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE, border.col=NA)
    > I3 <- image(USCounties, c(1,100), c(1,100), useAbs=FALSE, lwd=2, border.col=NA)
    > stopifnot(all.equal(I1, I2), all.equal(I2, I3))
    Error: I1 and I2 are not equal:
     Component "panel": Component "border.col": target is NULL, current is logical
    Execution halted
Flavor: r-devel-windows-ix86+x86_64