Running 'blkdiag.R' [173s]
  Running 'ceil.R' [159s]
  Running 'chebyshev.R' [160s]
  Running 'combs.R' [158s]
  Running 'compan.R' [173s]
  Running 'cond.R' [0s]
  Running 'conv.R' [0s]
  Running 'cross.R' [0s]
  Running 'crossn.R' [167s]
  Running 'deval.R' [156s]
  Running 'diag.R' [158s]
  Running 'distmat.R' [0s]
  Running 'dot.R' [0s]
  Running 'eig.R' [0s]
  Running 'factors.R' [154s]
  Running 'find.R' [0s]
  Running 'findintervals.R' [0s]
  Running 'findpeaks.R' [170s]
  Running 'flipdim.R' [0s]
  Running 'fnorm.R' [0s]
  Running 'gamma.R' [164s]
  Running 'gradient.R' [0s]
  Running 'hadamard.R' [171s]
  Running 'hankel.R' [0s]
  Running 'hilb.R' [0s]
  Running 'horner.R' [158s]
  Running 'hypot.R' [0s]
  Running 'interp1.R' [156s]
  Running 'interp2.R' [0s]
  Running 'inv.R' [178s]
  Running 'isprime.R' [145s]
  Running 'lambertW.R' [171s]
  Running 'linspace.R' [160s]
  Running 'magic.R' [0s]
  Running 'meshgrid.R' [0s]
  Running 'mldivide.R' [157s]
  Running 'mod.R' [0s]
  Running 'mode.R' [156s]
  Running 'nextpow2.R' [0s]
  Running 'norm.R' [166s]
  Running 'nthroot.R' [170s]
  Running 'pascal.R' [0s]
  Running 'pchip.R' [0s]
  Running 'perms.R' [0s]
  Running 'piecewise.R' [0s]
  Running 'poly.R' [0s]
  Running 'polyadd.R' [165s]
  Running 'polyarea.R' [151s]
  Running 'polyder.R' [0s]
  Running 'polyfit.R' [173s]
  Running 'polyint.R' [0s]
  Running 'polymul.R' [155s]
  Running 'polyval.R' [161s]
  Running 'pow2.R' [0s]
  Running 'primes.R' [0s]
  Running 'quad.R' [153s]
  Running 'quadrature.R' [1s]
  Running 'rank.R' [0s]
  Running 'rectint.R' [0s]
  Running 'regexp.R' [171s]
  Running 'roots.R' [0s]
  Running 'size.R' [153s]
  Running 'std.R' [0s]
  Running 'strfind.R' [150s]
  Running 'strings.R' [171s]
  Running 'subspace.R' [0s]
  Running 'trace.R' [0s]
  Running 'trapz.R' [172s]
  Running 'vander.R' [0s]
  Running 'wilkinson.R' [163s]
Running the tests in 'tests/blkdiag.R' failed.
Complete output:
  > ##
  > ##  r e p m a t . R  Test Suite
  > ##
  > 
  > repmat <- pracma::repmat
  > Reshape <- pracma::Reshape
  > 
  > v <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
  > a <- matrix(v, 3, 4)
  > identical(Reshape(a, 4, 3), matrix(v, 4, 3))
  [1] TRUE
  > 
  > identical(repmat(matrix(1:4, 2, 2), 3),
  +           matrix(rep(c(rep(c(1,2), 3), rep(c(3, 4), 3)), 3), nrow=6, ncol=6))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.07    0.21 
Running the tests in 'tests/ceil.R' failed.
Complete output:
  > ##
  > ##  c e i l . R  tests
  > ##
  > 
  > ceil <- pracma::ceil
  > Fix <- pracma::Fix
  > 
  > identical(ceil(0), 0)
  [1] TRUE
  > identical(ceil(-1), -1)
  [1] TRUE
  > identical(ceil(-1.5), -1)
  [1] TRUE
  > identical(ceil(1), 1)
  [1] TRUE
  > identical(ceil(1.5), 2)
  [1] TRUE
  > 
  > identical(Fix(0), 0)
  [1] TRUE
  > identical(Fix(-1), -1)
  [1] TRUE
  > identical(Fix(-1.5), -1)
  [1] TRUE
  > identical(Fix(1), 1)
  [1] TRUE
  > identical(Fix(1.5), 1)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.06    0.23 
Running the tests in 'tests/chebyshev.R' failed.
Complete output:
  > ##
  > ##  c h e b P o l y . R  Test suite
  > ##
  > 
  > 
  > chebPoly <- pracma::chebPoly
  > chebCoeff <- pracma::chebCoeff
  > chebApprox <- pracma::chebApprox
  > 
  > identical(chebPoly(6),
  +           matrix( c(0,   0,   0,   0,   0,   0,   1,
  +                     0,   0,   0,   0,   0,   1,   0,
  +                     0,   0,   0,   0,   2,   0,  -1,
  +                     0,   0,   0,   4,   0,  -3,   0,
  +                     0,   0,   8,   0,  -8,   0,   1,
  +                     0,  16,   0, -20,   0,   5,   0,
  +                    32,   0, -48,   0,  18,   0,  -1),
  +                  nrow = 7, ncol = 7, byrow=TRUE))
  [1] TRUE
  > 
  > f <- function(x) 1 + x/1 + x^2/2 + x^3/6 + x^4/24 + x^5/120 + x^6/720
  > cC <- chebCoeff(f, -1, 1, 6)
  > cC[1] <- cC[1]/2
  > all.equal(cC,
  +           c(1.26606, 1.13021, 0.27148, 0.04427, 0.00547, 0.00052, 0.00004),
  +           tol = 1e-5)
  [1] TRUE
  > 
  > x <- seq(-1, 1, length.out=7)
  > y <- chebApprox(x, function(x) x^2, -1, 1, 6)
  > all.equal(x^2, y, tol = 1e-7)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.04    0.21 
Running the tests in 'tests/combs.R' failed.
Complete output:
  > ##
  > ##  c o m b s . R  Test Suite
  > ##
  > 
  > combs <- pracma::combs
  > randcomb <- pracma::randcomb
  > 
  > identical(combs(2, 1), 2)
  [1] TRUE
  > identical(combs(c(1, 2, 3), 2), matrix(rep(c(1, 2, 3), each = 2), 3, 2))
  [1] TRUE
  > identical(nrow(combs(1:6, 4)), 15L)
  [1] TRUE
  > 
  > all(c(1,2,3) %in% randcomb(c(1,2,3), 3))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.06    0.20 
Running the tests in 'tests/compan.R' failed.
Complete output:
  > ###
  > ### compan.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.compan <- function(input, expected) {
  +    output <- do.call(getFromNamespace("compan", "pracma"), input)
  +    identical(output, expected)
  + }
  > 
  > compan.expected.empty  <- c()
  > compan.expected.sngl1  <- c()
  > compan.expected.sngl2  <- c()
  > compan.expected.bspl1  <- matrix(c(0, 7, -6, 1, 0, 0, 0, 1, 0),
  +                                  nrow=3, ncol=3, byrow=TRUE)
  > 
  > test.compan(list(p=c()), compan.expected.empty)
  [1] TRUE
  > test.compan(list(p=c(0)), compan.expected.sngl1)
  [1] TRUE
  > test.compan(list(p=c(1)), compan.expected.sngl2)
  [1] TRUE
  > test.compan(list(p=c(1,0,-7,6)), compan.expected.bspl1)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.14    0.07    0.20 
Running the tests in 'tests/crossn.R' failed.
Complete output:
  > ##
  > ##  c r o s s n . R  tests
  > ##
  > 
  > crossn <- pracma::crossn
  > 
  > x <- c(1.0, 0.0, 0.0)
  > y <- c(1.0, 0.5, 0.0)
  > z <- c(0.0, 0.0, 1.0)
  > identical(pracma::dot(x, crossn(rbind(y, z))),
  +           det(rbind(x, y, z)))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.10    0.20 
Running the tests in 'tests/deval.R' failed.
Complete output:
  > ##
  > ##  d e v a l . R  Test suite
  > ##
  > 
  > deval <- pracma::deval
  > deeve <- pracma::deeve
  > 
  > x <- seq(0, 10*pi, len=100)
  > y <- zapsmall(sin(x))
  > 
  > all.equal(deval(x, y, c(-1e-5, 0, 1, 5, 10, 15, 20, 25, 30, x[100], 40)),
  +           as.matrix(c(        NA,
  +                        0.0000000,
  +                        0.8358028,
  +                       -0.9499175,
  +                       -0.5372202,
  +                        0.6442378,
  +                        0.9117673,
  +                       -0.1307134,
  +                       -0.9756776,
  +                        0.0000000,
  +                               NA)),
  +           tolerance = 1e-5
  + )
  [1] TRUE
  > 
  > all.equal(deeve(x, y),
  +           c(0.000000, 3.141206, 6.282671, 9.424329, 12.566114, 15.707963,
  +             18.849812, 21.991597, 25.133255, 28.274720, 31.415927),
  +           tolerance = 1e-5)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.06    0.23 
Running the tests in 'tests/diag.R' failed.
Complete output:
  > ##
  > ##  m t r a c e . R  Test suite
  > ##
  > 
  > Diag <- pracma::Diag
  > 
  > all.equal(Diag(matrix(1:12,3,4),  1), c(4,8,12))
  [1] TRUE
  > all.equal(Diag(matrix(1:12,3,4), -1), c(2,6))
  [1] TRUE
  > identical(Diag(Diag(c(1,5,9)), 0), c(1,5,9))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.21    0.03    0.21 
Running the tests in 'tests/factors.R' failed.
Complete output:
  > ###
  > ### f a c t o r s . R  +++ Test suite +++
  > ###
  > 
  > 
  > test.factors <- function(input, expected) {
  +     output <- do.call(getFromNamespace("factors", "pracma"), input)
  +     identical(output, expected)
  + }
  > 
  > factors.expected.n2  <- 2
  > factors.expected.n3  <- 3
  > # factors.expected.prm <- 999983
  > # factors.expected.pr2 <- c(9999889, 9999901)
  > # factors.expected.prp <- c(65003, 65003)
  > # factors.expected.nn  <- c(2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 7, 7, 11)
  > # factors.expected.nm  <- c(99989, 99991, 100003)
  > # factors.expected.n32 <- c(3, 5, 17, 257, 65537)
  > 
  > test.factors(list(n=2), factors.expected.n2)
  [1] TRUE
  > test.factors(list(n=3), factors.expected.n3)
  [1] TRUE
  > # test.factors(list(n=999983), factors.expected.prm)
  > # test.factors(list(n=9999889*9999901), factors.expected.pr2)
  > # test.factors(list(n=4225390009), factors.expected.prp)
  > # test.factors(list(n=2^5 * 3^4 * 5^3 * 7^2 * 11), factors.expected.nn)
  > # test.factors(list(n=99989*99991*100003), factors.expected.nm)
  > # test.factors(list(n=2^32-1), factors.expected.n32)
  > 
  > proc.time()
     user  system elapsed 
     0.14    0.06    0.20 
Running the tests in 'tests/findpeaks.R' failed.
Complete output:
  > ##
  > ##  f i n d p e a k s . R  Test suite
  > ##
  > 
  > 
  > findpeaks <- pracma::findpeaks
  > 
  > x <- c(2, 12, 4, 6, 9, 4, 3, 1, 19, 7)
  > identical(findpeaks(x),
  +           matrix(c(12,9,19, 2,5,9, 1,3,8, 3,8,10), nrow=3, ncol=4))
  [1] TRUE
  > identical(findpeaks(x, npeaks = 1, sortstr = TRUE),
  +           matrix(c(19, 9, 8, 10), nrow = 1))
  [1] TRUE
  > identical(findpeaks(x, minpeakheight = 15),
  +           matrix(c(19, 9, 8, 10), nrow = 1))
  [1] TRUE
  > identical(findpeaks(x, threshold = 10),
  +           matrix(c(19, 9, 8, 10), nrow = 1))
  [1] TRUE
  > # Not yet implemented
  > # identical(findpeaks(x, threshold = 10),
  > #           c(19, 9, 8, 9))
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.04    0.21 
Running the tests in 'tests/gamma.R' failed.
Complete output:
  > ##
  > ##  g a m m a z . R  Test suite
  > ##
  > 
  > 
  > gammaz <- pracma::gammaz
  > 
  > ##  Problematic on Solaris (2012-01-25)
  > # y <- seq(from=0,to=5,by=0.5)
  > # # z0 <- lngamma_complex(1+y*1i)
  > # z0 <- c(0.0000000+0.0000000i, -0.1909455-0.2440583i, -0.6509232-0.3016403i,
  > #        -1.2344831-0.1629398i, -1.8760788+0.1296463i, -2.5499068+0.5426044i,
  > #        -3.2441443+1.0533508i, -3.9524671+1.6461926i, -4.6710996+2.3096981i,
  > #        -5.3976062+3.0351970i, -6.1303241-2.4672867i)
  > # 
  > # all.equal(gammaz(1+y*1i), exp(z0), tolerance = 1e-7)
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.06    0.20 
Running the tests in 'tests/hadamard.R' failed.
Complete output:
  > ##
  > ##  ha d a m a r d . R  Test suite
  > ##
  > 
  > 
  > hadamard <- pracma::hadamard
  > Toeplitz <- pracma::Toeplitz
  > 
  > all.equal(hadamard(2),
  +           matrix(c(1, 1, 1, -1), 2, 2))
  [1] TRUE
  > all.equal(hadamard(4),
  +           matrix(c(1,  1,  1,  1,
  +                    1, -1,  1, -1,
  +                    1,  1, -1, -1,
  +                    1, -1, -1,  1), 4, 4))
  [1] TRUE
  > # H12 <- hadamard(12)
  > # all.equal(t(H12) %*% H12,
  > #           diag(12, 12, 12))
  > # H20 <- hadamard(20)
  > # all.equal(t(H20) %*% H20,
  > #           diag(20, 20, 20))
  > 
  > all.equal(Toeplitz(c(1, 2, 4, 6, 8), c(1, 3, 5, 7, 9)),
  +           matrix(c(1, 3, 5, 7, 9,
  +                    2, 1, 3, 5, 7,
  +                    4, 2, 1, 3, 5,
  +                    6, 4, 2, 1, 3,
  +                    8, 6, 4, 2, 1), 5, 5, byrow = TRUE))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.17    0.06    0.21 
Running the tests in 'tests/horner.R' failed.
Complete output:
  > ##
  > ##  h or n e r . R  Test Suite
  > ##
  > 
  > 
  > horner <- pracma::horner
  > hornerdefl <- pracma::hornerdefl
  > 
  > p <- c(1, 0, 1)
  > x <- c(-2, -1, 0, 1, 2)
  > identical(horner(p, x)$y, x^2 + 1)
  [1] TRUE
  > identical(horner(p, x)$dy, 2*x)
  [1] TRUE
  > 
  > p <- c(1, -6, 11, -6)
  > identical(hornerdefl(p, 3)$y, 0)
  [1] TRUE
  > identical(hornerdefl(p, 3)$q, (c(1, -3, 2)))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.14    0.12    0.26 
Running the tests in 'tests/interp1.R' failed.
Complete output:
  > ##
  > ##  i n t e r p 1 . R Test suite
  > ##
  > 
  > 
  > interp1 <- pracma::interp1
  > 
  > x <- c(0.0, 0.5, 1.0, 1.5)
  > y <- x^2
  > xi <- c(0.25, 0.75, 1.25)
  > 
  > identical(interp1(x, y, xi, method="constant"), c(0.0, 0.25, 1.0))
  [1] TRUE
  > identical(interp1(x, y, xi, method="linear"),   c(0.125, 0.625, 1.625))
  [1] TRUE
  > identical(interp1(x, y, xi, method="nearest"),  c(0.25, 1.00, 2.25))
  [1] TRUE
  > identical(interp1(x, y, xi, method="spline"),   c(0.0625, 0.5625, 1.5625))
  [1] FALSE
  > 
  > # Not yet implemented
  > # identical(interp1(x, y, xi, method="cubic"),    c(0.0781, 0.5547, 1.5547))
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.04    0.18 
Running the tests in 'tests/inv.R' failed.
Complete output:
  > ###
  > ### eig.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.inv <- function(input, expected) {
  +    output <- do.call(getFromNamespace("inv", "pracma"), input)
  +    identical(output, expected)
  + }
  > 
  > inv.expected.empty <- matrix(0, nrow=0, ncol=0)
  > inv.expected.singl <- matrix(Inf, 2, 2)
  > inv.expected.mat1  <- matrix(c(3,-3,1, -3,5,-2, 1,-2,1), 3, 3)
  > 
  > test.inv(list(a=c()), inv.expected.empty)
  [1] TRUE
  > test.inv(list(a=matrix(1, 2, 2)), inv.expected.singl)
  [1] TRUE
  Warning message:
  In (function (a)  : Matrix appears to be singular.
  > test.inv(list(a=matrix(c(1,1,1, 1,2,3, 1,3,6), 3, 3)), inv.expected.mat1)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.07    0.26 
Running the tests in 'tests/isprime.R' failed.
Complete output:
  > ###
  > ### ISPRIME.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.isprime <- function(input, expected) {
  +     output <- do.call(getFromNamespace("isprime", "pracma"), input)
  +     identical(output, expected)
  + }
  > 
  > isprime.expected.n1 <- 0
  > isprime.expected.n2 <- 1
  > isprime.expected.n100  <- 
  +     matrix(c(0, 1, 1, 0, 1, 0, 1, 0, 0, 0,
  +              1, 0, 1, 0, 0, 0, 1, 0, 1, 0,
  +              0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
  +              1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
  +              1, 0, 1, 0, 0, 0, 1, 0, 0, 0,
  +              0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
  +              1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
  +              1, 0, 1, 0, 0, 0, 0, 0, 1, 0,
  +              0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
  +              0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ),
  +            nrow=10, ncol=10, byrow=TRUE)
  > 
  > test.isprime(list(x=1), isprime.expected.n1)
  [1] TRUE
  > test.isprime(list(x=2), isprime.expected.n2)
  [1] TRUE
  > test.isprime(list(x=matrix(1:100, 10, 10, byrow=TRUE)),
  +     isprime.expected.n100)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.21    0.06    0.26 
Running the tests in 'tests/lambertW.R' failed.
Complete output:
  > ##
  > ##  l a m b e r t W . R  test suite
  > ##
  > 
  > 
  > lambertWp <- pracma::lambertWp
  > 
  > x <- seq(0, 10, len=21)
  > # y <- lambert_W0(x)
  > y0 <- c(0.0000000, 0.3517337, 0.5671433, 0.7258614, 0.8526055, 0.9585864,
  +         1.0499089, 1.1302893, 1.2021679, 1.2672378, 1.3267247, 1.3815454,
  +         1.4324048, 1.4798568, 1.5243452, 1.5662310, 1.6058120, 1.6433371,
  +         1.6790164, 1.7130288, 1.7455280)
  > 
  > all.equal(lambertWp(x), y0, tolerance = 1e-7)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.06    0.25 
Running the tests in 'tests/linspace.R' failed.
Complete output:
  > ##
  > ##  l i n s p a c e . R
  > ##
  > 
  > linspace <- pracma::linspace
  > logspace <- pracma::logspace
  > logseq   <- pracma::logseq
  > 
  > identical(linspace(1, 100), as.numeric(1:100))
  [1] TRUE
  > identical(linspace(0, 25, 5), c(0, 6.25, 12.50, 18.75, 25))
  [1] TRUE
  > identical(linspace(1, 25, 1.5), 25)
  [1] TRUE
  > identical(all.equal(logspace(1, pi, n=5),
  +                     c(10.0000, 7.4866, 5.6050, 4.1963, 3.1416),
  +                     tolerance=0.0001),
  +           TRUE)
  [1] TRUE
  > all.equal(logseq(1, 100, 3), c(1, 10, 100))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.12    0.14    0.23 
Running the tests in 'tests/mldivide.R' failed.
Complete output:
  > ##
  > ##  m l d i v i d e . R  test suite
  > ##
  > 
  > 
  > mldivide <- pracma::mldivide
  > mrdivide <- pracma::mrdivide
  > 
  > A <- matrix(c(8,1,6, 3,5,7, 4,9,2), nrow = 3, ncol = 3, byrow = TRUE)
  > identical(all.equal(mldivide(A, A), diag(1, 3, 3), tolerance=1e-7), TRUE)
  [1] TRUE
  > identical(all.equal(mrdivide(A, A), diag(1, 3, 3), tolerance=1e-7), TRUE)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.01    0.20 
Running the tests in 'tests/mode.R' failed.
Complete output:
  > ##
  > ##  m o d e . R
  > ##
  > 
  > 
  > Mode <- pracma::Mode
  > 
  > x <- c(1:100, rep(5,3), rep(27,5), rep(71,4), rep(89,2), rep(100, 5))
  > identical(Mode(x), 27)
  [1] TRUE
  > 
  > x <- as.factor(x)
  > identical(Mode(x), "27")
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.07    0.23 
Running the tests in 'tests/norm.R' failed.
Complete output:
  > ##
  > ##  n o r m  Test suite
  > ##
  > 
  > 
  > Norm <- pracma::Norm
  > 
  > identical(Norm(c(3, 4)), 5)
  [1] TRUE
  > identical(Norm(c(1, 1, 1), p=2), sqrt(3))
  [1] TRUE
  > identical(Norm(1:10, p = 1), sum(1:10)+0.0)
  [1] TRUE
  > identical(Norm(1:10, p = 0), Inf)
  [1] TRUE
  > identical(Norm(1:10, p = Inf), max(1:10))
  [1] TRUE
  > identical(Norm(1:10, p = -Inf), min(1:10))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.17    0.09    0.21 
Running the tests in 'tests/nthroot.R' failed.
Complete output:
  > ###
  > ### NTHROOT.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.nthroot <- function(input, expected) {
  +     output <- do.call(getFromNamespace("nthroot", "pracma"), input)
  +     identical(output, expected)
  + }
  > 
  > nthroot.expected.n0 <- c(-1.2)
  > nthroot.expected.n1 <- c(1, -2, 3)
  > nthroot.expected.n2 <- c(1,  0, 3)
  > nthroot.expected.n3 <- c(1, -2, 3)
  > 
  > test.nthroot(list(x=-1.2^5, n=5), nthroot.expected.n0)
  [1] TRUE
  > test.nthroot(list(x=c(1,-2, 3), n=1), nthroot.expected.n1)
  [1] TRUE
  > test.nthroot(list(x=c(1, 0, 9), n=2), nthroot.expected.n2)
  [1] TRUE
  > test.nthroot(list(x=c(1,-8,27), n=3), nthroot.expected.n3)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.04    0.23 
Running the tests in 'tests/polyadd.R' failed.
Complete output:
  > ##
  > ##  p o l y m u l . R  Test suite
  > ##
  > 
  > 
  > polyadd <- pracma::polyadd
  > 
  > identical(polyadd(c(1, 1, 1), 1), c(1, 1, 2))
  [1] TRUE
  > identical(polyadd(c(1, 1, 1), c(0, 1)), c(1, 1, 2))
  [1] TRUE
  > identical(polyadd(c(0.5, 1, 1), c(0.5, 1, -1)), c(1, 2, 0))
  [1] TRUE
  > identical(polyadd(c(0.5, 1, 1), c(-0.5, -1, 1)), c(2))
  [1] TRUE
  > identical(polyadd(c(0, 0, 1, 2, 2), c(0, 1, 2, 3, 4)), c(1, 3, 5, 6))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.06    0.21 
Running the tests in 'tests/polyarea.R' failed.
Complete output:
  > ###
  > ### polyarea.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.polyarea <- function(input, expected) {
  +    output <- do.call(getFromNamespace("polyarea", "pracma"), input)
  +    identical(output, expected)
  + }
  > 
  > polyarea.expected.empty <- 0
  > polyarea.expected.gen1 <- 3.5
  > polyarea.expected.gen2 <- 4
  > polyarea.expected.mtrx <- c(4, 4)
  > polyarea.expected.cmpl <- 0.5
  > 
  > test.polyarea(list(x=c(), y=c()), polyarea.expected.empty)
  [1] TRUE
  > test.polyarea(list(x=c(0,2,2,1,0), y=c(0,-1,2,1,1)), polyarea.expected.gen1)
  [1] TRUE
  > test.polyarea(list(x=matrix(c(1,1,3,3,1), 5, 1),
  +                    y=matrix(c(1,3,3,1,1), 5, 1)),
  +               polyarea.expected.gen2)
  [1] FALSE
  > test.polyarea(list(x=matrix(c(1,3,3,1,1,1,3,3), 4, 2),
  +                    y=matrix(c(1,1,3,3,1,3,3,1), 4, 2)),
  +               polyarea.expected.mtrx)
  [1] FALSE
  > test.polyarea(list(x=c(0,1,1,0), y=c(0,0,1i,0)), polyarea.expected.cmpl)
  [1] FALSE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.09    0.26 
Running the tests in 'tests/polyfit.R' failed.
Complete output:
  > ###
  > ### polyfit.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.polyfit <- function(input, expected) {
  +    output <- do.call(getFromNamespace("polyfit", "pracma"), input)
  +    identical(all.equal(output,
  +                        expected,
  +                        tolerance=1e-7),
  +              TRUE
  +     )
  + }
  > 
  > polyfit.expected.n1  <- c(1, 0)
  > polyfit.expected.n23 <- c(0, 1, 1, 1)
  > polyfit.expected.n4  <- c(-1, 0, 7, 0, 0) / 6
  > polyfit.expected.mat <- c(0, 1, -14, 65, -112, 60) / 12
  > 
  > test.polyfit(list(x=c(1,2,3), y=c(1,2,3)), polyfit.expected.n1)
  [1] TRUE
  > test.polyfit(list(x=c(-2,-1,0,1,2), y=c(3,1,1,3,7), n=3), polyfit.expected.n23)
  [1] TRUE
  > test.polyfit(list(x=c(-2,-1,0,1,2), y=c(2,1,0,1,2), n=4), polyfit.expected.n4)
  [1] TRUE
  > test.polyfit(list(x=matrix(1:6, nrow=2, ncol=3, byrow=TRUE),
  +                   y=matrix(c(0,0,1,1,0,0), nrow=2, ncol=3, byrow=TRUE),
  +                   n=5), polyfit.expected.mat)
  [1] TRUE
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.23    0.04    0.28 
Running the tests in 'tests/polymul.R' failed.
Complete output:
  > ##
  > ##  p o l y m u l . R  Test suite
  > ##
  > 
  > 
  > polymul <- pracma::polymul
  > 
  > identical(polymul(c(0.5), c(2, 4, 8)), c(1, 2, 4))
  [1] TRUE
  > identical(polymul(c(2.5, 1.5, 0.5), c(2)), c(5, 3, 1))
  [1] TRUE
  > identical(polymul(c(1, 1, 1), c(0, 1, 1, 1)), c(1, 2, 3, 2, 1))
  [1] TRUE
  > identical(polymul(c(1, 0, 0), c(0, 0, 1)), c(1, 0, 0))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.09    0.23 
Running the tests in 'tests/polyval.R' failed.
Complete output:
  > ###
  > ### polyval.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.polyval <- function(input, expected) {
  +    output <- do.call(getFromNamespace("polyval", "pracma"), input)
  +    identical(output, expected)
  + }
  > 
  > polyval.expected.empty1 <- c()
  > polyval.expected.empty2 <- c(0, 0)
  > polyval.expected.vec <- c(3, 1, 1, 3, 7)
  > polyval.expected.mat <- matrix(c(1, 4, 9, 16), nrow=2, ncol=2)
  > 
  > test.polyval(list(p=c(1,1), x=c()), polyval.expected.empty1)
  [1] TRUE
  > test.polyval(list(p=c(), x=c(1,1)), polyval.expected.empty2)
  [1] TRUE
  > test.polyval(list(p=c(1,1,1), x=-2:2), polyval.expected.vec)
  [1] TRUE
  > test.polyval(list(p=c(1,0,0), x=matrix(1:4, 2, 2)), polyval.expected.mat)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.04    0.23 
Running the tests in 'tests/quad.R' failed.
Complete output:
  > ##
  > ##  q u a d . R  Test suite
  > ##
  > 
  > 
  > quad <- pracma::quad
  > 
  > all.equal(quad(sin, 0, pi), 2, tol = 1e-7)
  [1] TRUE
  > all.equal(quad(sin, 0, 2*pi), 0, tol = 1e-7)
  [1] TRUE
  > all.equal(quad(exp, 0, 1), exp(1) - 1, tol=1e-7)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.14    0.15    0.25 
Running the tests in 'tests/regexp.R' failed.
Complete output:
  > ##
  > ##  r e g e x p . R  Test suite
  > ##
  > 
  > 
  > regexp <- pracma::regexp
  > regexpi <- pracma::regexpi
  > regexprep <- pracma::regexprep
  > refindall <- pracma::refindall
  > 
  > s <- "bat cat can car COAT court cut ct CAT-scan"
  > pat <-  'c[aeiou]+t'
  > identical(regexp(s, pat)$match,
  +           c("cat", "cut"))
  [1] TRUE
  > identical(regexpi(s, pat)$match,
  +           c("cat", "COAT", "cut", "CAT"))
  [1] TRUE
  > identical(regexp(s, pat, once = TRUE)$match,
  +           c("cat"))
  [1] TRUE
  > identical(regexp(s, pat, ignorecase = TRUE, split = TRUE)$split,
  +           c("bat ", " can car ", " court ", " ct ", "-scan"))
  [1] TRUE
  > 
  > identical(regexprep(s, pat, '---'),
  +           c("bat --- can car COAT court --- ct CAT-scan"))
  [1] TRUE
  > identical(regexprep(s, pat, '---', once = TRUE),
  +           c("bat --- can car COAT court cut ct CAT-scan"))
  [1] TRUE
  > identical(regexprep(s, pat, '---', ignorecase = TRUE),
  +           c("bat --- can car --- court --- ct ----scan"))
  [1] TRUE
  > 
  > identical(refindall("AbababaBa", 'aba'), c(3, 5))
  [1] TRUE
  > identical(refindall("AbababaBa", 'aba', ignorecase = TRUE), c(1, 3, 5, 7))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.03    0.20 
Running the tests in 'tests/size.R' failed.
Complete output:
  > ##
  > ##  s i z e . R  tests
  > ##
  > 
  > size <- pracma::size
  > numel <- pracma::numel
  > ndims <- pracma::ndims
  > isempty <- pracma::isempty
  > 
  > identical(size(1:8), c(1, 8))
  [1] TRUE
  > identical(size(1:8, 1), 1)
  [1] TRUE
  > identical(size(1:8, 2), 8)
  [1] TRUE
  > identical(size(1:8, 3), 1)
  [1] TRUE
  > identical(size(matrix(1:12, 3, 4)), c(3L, 4L))
  [1] TRUE
  > 
  > identical(numel(array(0, c(4,4,2))), 32)
  [1] TRUE
  > identical(numel(1:100), 100)
  [1] TRUE
  > 
  > identical(ndims(array(NA, c(4,4,2))), 3L)
  [1] TRUE
  > identical(ndims(list(a=1:5)), 2L)
  [1] FALSE
  > 
  > identical(isempty(numeric(0)), TRUE)
  [1] TRUE
  > identical(isempty(matrix(0, 1, 0)), TRUE)
  [1] TRUE
  > identical(isempty(matrix(0, 1, 1)), FALSE)
  [1] TRUE
  > identical(isempty(array(NA, c(2,2,2))), FALSE)
  [1] TRUE
  > identical(isempty(array(NA, c(2,0,2))), TRUE)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.12    0.12    0.17 
Running the tests in 'tests/strfind.R' failed.
Complete output:
  > ##
  > ##  s t r f i n d . R  Test suite
  > ##
  > 
  > 
  > strfind <- pracma::strfind
  > strfindi <- pracma::strfindi
  > #findstr <- pracma::findstr
  > 
  > identical(strfind("", "aba"), NULL)
  [1] TRUE
  > identical(strfind("ab", "aba"), NULL)
  [1] TRUE
  > identical(strfind("aba", "aba"), 1)
  [1] TRUE
  > identical(strfind("ababa", "aba"), c(1, 3))
  [1] TRUE
  > identical(strfind("ababa", "aba", overlap=FALSE), 1)
  [1] TRUE
  > 
  > identical(strfindi("ABA", "aba"), 1)
  [1] TRUE
  > identical(strfindi("aba", "ABA"), 1)
  [1] TRUE
  > identical(strfindi("ABABA", "aba"), c(1, 3))
  [1] TRUE
  > identical(strfindi("aBaBa", "AbA", overlap=FALSE), 1)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.12    0.07    0.18 
Running the tests in 'tests/strings.R' failed.
Complete output:
  > ##
  > ##  s t r i n g s . R  tests
  > ##
  > 
  > strcat <- pracma::strcat
  > strcmp <- pracma::strcmp
  > strcmpi <- pracma::strcmpi
  > 
  > strcmp(" empty", " empty")               # T
  [1] TRUE
  > !strcmp("empty ", "empty")               # F
  [1] TRUE
  > !strcmp("foobar", "barfoo")              # F
  [1] TRUE
  > !strcmp("string", "String")              # F
  [1] TRUE
  > !strcmp(c("yes", "no"), c("yes", "on"))  # F
  [1] TRUE
  > !strcmp(c("abc", "abc"), c("abc"))       # F
  [1] TRUE
  > strcmp(c("yes", "no"), c("yes", "no"))   # T
  [1] TRUE
  > 
  > strcmpi("string", "String")              # T
  [1] TRUE
  > strcmpi(c("yes", "no"), c("Yes", "No"))  # T
  [1] TRUE
  > 
  > blanks <- pracma::blanks
  > deblank <- pracma::deblank
  > strTrim <- pracma::strTrim
  > strjust <- pracma::strjust
  > strRep <- pracma::strRep
  > 
  > identical(c(blanks(0), blanks(1), blanks(2)), c("", " ", "  "))
  [1] TRUE
  > s <- c("  abc", "abc   ", " abc ", " a b c ", "abc", "a b c")
  > identical(deblank(s), c("  abc", "abc", " abc", " a b c", "abc", "a b c"))
  [1] TRUE
  > identical(strTrim(s), c("abc", "abc", "abc", "a b c", "abc", "a b c"))
  [1] TRUE
  > identical(strjust(s, justify = "center"),
  +           c(" abc ", " abc ", " abc ", "a b c", " abc ", "a b c"))
  [1] TRUE
  > s <- c('This is a good example.', "He has a good character.",
  +        'This is good, good food.', "How goodgood this is!")
  > identical(strRep(s, 'good', 'great'),
  +           c('This is a great example.', "He has a great character.",
  +             'This is great, great food.', "How greatgreat this is!"))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.14    0.10    0.23 
Running the tests in 'tests/trapz.R' failed.
Complete output:
  > ###
  > ### trapz.R  +++ Test suite +++
  > ###
  > 
  > 
  > test.trapz <- function(input, expected) {
  +    output <- do.call(getFromNamespace("trapz", "pracma"), input)
  +    identical(output, expected)
  + }
  > 
  > trapz.expected.empty1 <- 0
  > trapz.expected.empty2 <- 0
  > trapz.expected.gen1 <- 12
  > trapz.expected.gen2 <- 6
  > trapz.expected.cmpl1 <- 0+0.5i
  > trapz.expected.cmpl2 <- 0+0.5i
  > 
  > test.trapz(list(x=c()), trapz.expected.empty1)
  [1] TRUE
  > test.trapz(list(x=c(), y=c()), trapz.expected.empty2)
  [1] TRUE
  > test.trapz(list(x=1:5), trapz.expected.gen1)
  [1] TRUE
  > test.trapz(list(x=seq(0,2,by=0.5), y=1:5), trapz.expected.gen2)
  [1] TRUE
  > test.trapz(list(x=c(0,1), y=c(0,1i)), trapz.expected.cmpl1)
  [1] TRUE
  > test.trapz(list(x=c(0,1i), y=c(0,1)), trapz.expected.cmpl2)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.03    0.21 
Running the tests in 'tests/wilkinson.R' failed.
Complete output:
  > ###
  > ### wilkinson.R  +++ Test suite +++
  > ###
  > 
  > wilkinson <- pracma::wilkinson
  > 
  > identical(wilkinson(0), NULL)
  [1] TRUE
  > identical(wilkinson(1), matrix(0, nrow=1, ncol=1))
  [1] TRUE
  > identical(wilkinson(3), matrix(c(1,1,0, 1,0,1, 0,1,1), 3, 3))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.17    0.01    0.17