CRAN Package Check Results for Package mcompanion

Last updated on 2019-03-14 00:46:45 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.4-5 10.24 75.79 86.03 OK
r-devel-linux-x86_64-debian-gcc 0.4-5 8.19 59.18 67.37 OK
r-devel-linux-x86_64-fedora-clang 0.4-5 107.48 OK
r-devel-linux-x86_64-fedora-gcc 0.4-5 97.79 OK
r-devel-windows-ix86+x86_64 0.4-5 24.00 102.00 126.00 OK
r-patched-linux-x86_64 0.4-5 7.59 68.10 75.69 OK
r-patched-solaris-x86 0.4-5 157.50 OK
r-release-linux-x86_64 OK
r-release-windows-ix86+x86_64 0.4-5 19.00 81.00 100.00 OK
r-release-osx-x86_64 0.4-5 OK
r-oldrel-windows-ix86+x86_64 0.4-5 14.00 76.00 90.00 ERROR
r-oldrel-osx-x86_64 0.4-5 OK

Additional issues

ATLAS

Check Details

Version: 0.4-5
Check: examples
Result: ERROR
    Running examples in 'mcompanion-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: mCompanion
    > ### Title: Create objects from class MultiCompanion
    > ### Aliases: mCompanion initialize,MultiCompanion-method
    > ### Keywords: matrices
    >
    > ### ** Examples
    >
    > # simulate a 6x6 mc matrix with 4 non-trivial rows
    > mCompanion("sim", dim = 4, mo = 2)
    4 x 4 Matrix of class "MultiCompanion"
     [,1] [,2] [,3] [,4]
    [1,] -1.170461 0.6054215 -0.04341138 -0.2038175
    [2,] -1.346151 1.0229507 -0.00550631 -0.2507209
    [3,] 1.000000 0.0000000 0.00000000 0.0000000
    [4,] 0.000000 1.0000000 0.00000000 0.0000000
    > mCompanion("sim", dim = 6, mo = 4)
    6 x 6 Matrix of class "MultiCompanion"
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] 0.1938633 -0.598005 -0.08429913 -0.1832184 0.54077349 0.2173426
    [2,] 0.3640704 -1.306469 0.57602190 -0.4715744 -0.02374183 0.6360189
    [3,] 0.7875770 -1.574361 0.34134571 -0.6473999 0.22476773 0.1558074
    [4,] -0.3304401 2.292227 -1.14175473 0.7626924 0.60687244 -1.3310871
    [5,] 1.0000000 0.000000 0.00000000 0.0000000 0.00000000 0.0000000
    [6,] 0.0000000 1.000000 0.00000000 0.0000000 0.00000000 0.0000000
    > # similar to above but top rows with 2 non-zero columns
    > mCompanion("sim", dim = 6, mo = 4, mo.col = 2)
    6 x 6 Matrix of class "MultiCompanion"
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] 0.6417915 0.01340705 0 0 0 0
    [2,] -5.6093765 0.83793335 0 0 0 0
    [3,] 9.5780471 0.85276294 0 0 0 0
    [4,] 18.2924703 1.10789468 0 0 0 0
    [5,] 1.0000000 0.00000000 0 0 0 0
    [6,] 0.0000000 1.00000000 0 0 0 0
    >
    > m1 <- matrix(1:24, nrow = 4)
    > mCompanion(m1) # mc matrix with m1 on top
    6 x 6 Matrix of class "MultiCompanion"
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] 1 5 9 13 17 21
    [2,] 2 6 10 14 18 22
    [3,] 3 7 11 15 19 23
    [4,] 4 8 12 16 20 24
    [5,] 1 0 0 0 0 0
    [6,] 0 1 0 0 0 0
    >
    > m2 <- rbind(c(1, 2, 0, 0), c(3, 4, 0, 0))
    > x2a <- mCompanion(m2) # mc matrix with m2 on top
    > x2a@mo.col # = 4
    [1] 4
    >
    > x2 <- mCompanion(m2, mo.col = "detect")
    > x2@mo.col # = 2, detects the 0 columns in m2
    [1] 2
    > mCompanion(m2, mo.col = 2) # same
    4 x 4 Matrix of class "MultiCompanion"
     [,1] [,2] [,3] [,4]
    [1,] 1 2 0 0
    [2,] 3 4 0 0
    [3,] 1 0 0 0
    [4,] 0 1 0 0
    >
    > # create manually an mc matrix
    > (m3 <- rbind(m1, c(1, rep(0, 5)), c(0, 1, rep(0, 4))))
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] 1 5 9 13 17 21
    [2,] 2 6 10 14 18 22
    [3,] 3 7 11 15 19 23
    [4,] 4 8 12 16 20 24
    [5,] 1 0 0 0 0 0
    [6,] 0 1 0 0 0 0
    > # turn it into a MultiCompanion object
    > x3 <- mCompanion(x = m3, detect = "mo")
    > x3@mo
    [1] 4
    > x3 <- mCompanion(m3)
    > x3@mo
    [1] 4
    >
    > m4 <- rbind(c(1, 2, rep(0, 4)), c(3, 4, rep(0, 4)))
    >
    > x4 <- mCompanion(m4, mo = 2)
    > x4@mo.col # = 6,
    [1] 6
    > ## special structure not incorporated in x4,
    > ## eigen and mc_eigen are equiv. in this case
    > eigen(x4)
    eigen() decomposition
    $values
    [1] 5.3722813 -0.3722813 0.0000000 0.0000000 0.0000000 0.0000000
    
    $vectors
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] -0.40871213 -0.10620629 0 0.000000e+00 0 0.000000e+00
    [2,] -0.89350221 0.07287246 0 0.000000e+00 0 0.000000e+00
    [3,] -0.07607795 0.28528504 0 6.012505e-292 0 0.000000e+00
    [4,] -0.16631709 -0.19574567 0 0.000000e+00 0 6.012505e-292
    [5,] -0.01416120 -0.76631576 1 -1.000000e+00 0 0.000000e+00
    [6,] -0.03095837 0.52580040 0 0.000000e+00 1 -1.000000e+00
    
    > mc_eigen(x4)
    eigen() decomposition
    $values
    [1] 5.3722813 -0.3722813 0.0000000 0.0000000 0.0000000 0.0000000
    
    $vectors
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] -0.40871213 -0.10620629 0 0.000000e+00 0 0.000000e+00
    [2,] -0.89350221 0.07287246 0 0.000000e+00 0 0.000000e+00
    [3,] -0.07607795 0.28528504 0 6.012505e-292 0 0.000000e+00
    [4,] -0.16631709 -0.19574567 0 0.000000e+00 0 6.012505e-292
    [5,] -0.01416120 -0.76631576 1 -1.000000e+00 0 0.000000e+00
    [6,] -0.03095837 0.52580040 0 0.000000e+00 1 -1.000000e+00
    
    $len.block
    [1] 1 1 1 1 1 1
    
    >
    > x4a <- mCompanion(m4, mo = 2, mo.col = 2)
    > x4a@mo.col # = 2, has Jordan blocks of size > 1
    [1] 2
    > ## the eigenvectors do not span the space:
    > eigen(x4a)
    eigen() decomposition
    $values
    [1] 5.3722813 -0.3722813 0.0000000 0.0000000 0.0000000 0.0000000
    
    $vectors
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] -0.40871213 -0.10620629 0 0.000000e+00 0 0.000000e+00
    [2,] -0.89350221 0.07287246 0 0.000000e+00 0 0.000000e+00
    [3,] -0.07607795 0.28528504 0 6.012505e-292 0 0.000000e+00
    [4,] -0.16631709 -0.19574567 0 0.000000e+00 0 6.012505e-292
    [5,] -0.01416120 -0.76631576 1 -1.000000e+00 0 0.000000e+00
    [6,] -0.03095837 0.52580040 0 0.000000e+00 1 -1.000000e+00
    
    > ## mc_eigen exploits the Jordan structure ((e.g.2x2 Jordan blocks):
    > (ev <- mc_eigen(x4a))
    $values
    [1] 5.3722813 -0.3722813 0.0000000 0.0000000
    
    $vectors
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] -0.41597356 -0.8245648 0 0 0 0
    [2,] -0.90937671 0.5657675 0 0 0 0
    [3,] -0.07742959 2.2148971 0 1 0 0
    [4,] -0.16927198 -1.5197310 0 0 0 1
    [5,] -0.01441280 -5.9495253 1 0 0 0
    [6,] -0.03150840 4.0822112 0 0 1 0
    
    $len.block
    [1] 1 1 2 2
    
    >
    > x4a %*% ev$vectors
    6 x 6 Matrix of class "dgeMatrix"
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] -2.23472698 0.3069701 0 0 0 0
    [2,] -4.88542751 -0.2106247 0 0 0 0
    [3,] -0.41597356 -0.8245648 0 0 0 0
    [4,] -0.90937671 0.5657675 0 0 0 0
    [5,] -0.07742959 2.2148971 0 1 0 0
    [6,] -0.16927198 -1.5197310 0 0 0 1
    >
    > ## construct the Jordan matrix of x4a from eigenvalues and eigenvectors
    > (x4a.j <- Jordan_matrix(ev$values, ev$len.block))
     [,1] [,2] [,3] [,4] [,5] [,6]
    [1,] 5.372281 0.0000000 0 0 0 0
    [2,] 0.000000 -0.3722813 0 0 0 0
    [3,] 0.000000 0.0000000 0 1 0 0
    [4,] 0.000000 0.0000000 0 0 0 0
    [5,] 0.000000 0.0000000 0 0 0 1
    [6,] 0.000000 0.0000000 0 0 0 0
    >
    > ## check that AX = XJ and A = XJX^-1, up to numerical precision:
    > x4a %*% ev$vectors - ev$vectors %*% x4a.j
    6 x 6 sparse Matrix of class "dgCMatrix"
    Error in isFALSE(suppRows) : could not find function "isFALSE"
    Calls: <Anonymous> -> <Anonymous> -> printSpMatrix2
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64