Running ‘run-all.R’
Running the tests in ‘tests/run-all.R’ failed.
Complete output:
  > # /usr/bin/r
  > #
  > # Copyright 2015-2015 Steven E. Pav. All Rights Reserved.
  > # Author: Steven E. Pav
  > #
  > # This file is part of madness.
  > #
  > # madness is free software: you can redistribute it and/or modify
  > # it under the terms of the GNU Lesser General Public License as published by
  > # the Free Software Foundation, either version 3 of the License, or
  > # (at your option) any later version.
  > #
  > # madness is distributed in the hope that it will be useful,
  > # but WITHOUT ANY WARRANTY; without even the implied warranty of
  > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > # GNU Lesser General Public License for more details.
  > #
  > # You should have received a copy of the GNU Lesser General Public License
  > # along with madness.  If not, see <http://www.gnu.org/licenses/>.
  > #
  > # Created: 2015.11.28
  > # Copyright: Steven E. Pav, 2015
  > # Author: Steven E. Pav <shabbychef@gmail.com>
  > # Comments: Steven E. Pav
  > 
  > # because Hadley says it should be like this.
  > # see https://github.com/hadley/devtools/wiki/Testing
  > 
  > library(testthat)
  > library(madness)
  
  Attaching package: 'madness'
  
  The following object is masked from 'package:base':
  
      diag
  
  > 
  > #test_package("madness")
  > test_check("madness")
  Loading required package: Matrix
  
  Attaching package: 'Matrix'
  
  The following objects are masked from 'package:madness':
  
      det, tril, triu
  
  
  Attaching package: 'expm'
  
  The following object is masked from 'package:Matrix':
  
      expm
  
  The following object is masked from 'package:madness':
  
      sqrtm
  
  1. Error: initialize (@test-basic.r#41) ----------------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: as.madness(amod, xtag = xt, vtag = yt) at testthat/test-basic.r:41
  2: as.madness.default(amod, xtag = xt, vtag = yt)
  3: madness(val, xtag = xtag, vtag = vtag, varx = varx)
  4: diag(1, nrow = length(val))
  5: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  6: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  2. Error: initialize errors (@test-basic.r#76) ---------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_warning(dumb <- madness(xval, vtag = yt, xtag = xt)) at testthat/test-basic.r:76
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: madness(xval, vtag = yt, xtag = xt)
  5: diag(1, nrow = length(val))
  6: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  7: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  3. Error: basic getters and setters (@test-basic.r#95) -------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: madness(xval) at testthat/test-basic.r:95
  2: diag(1, nrow = length(val))
  3: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  4: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  4. Error: eigen? (@test-basic.r#347) -------------------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: eigen(xmad + t(xmad)) at testthat/test-basic.r:347
  2: eigen(xmad + t(xmad))
  3: lapply(seq_len(p), function(jj) {
         scals <- 1/(vvals$values[jj] - vvals$values[-jj])
         krons <- t(vvals$vectors[, -jj, drop = FALSE]) %x% t(vvals$vectors[, jj, drop = FALSE]) %*% 
             x@dvdx
         rv <- vvals$vectors[, -jj, drop = FALSE] %*% diag(scals) %*% krons
     })
  4: FUN(X[[i]], ...)
  5: diag(scals)
  6: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  7: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  5. Error: theta (@test-basic.r#357) --------------------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: theta(MV) at testthat/test-basic.r:357
  2: madness(val = mu, vtag = "theta", xtag = xtag, varx = Ohat)
  3: diag(1, nrow = length(val))
  4: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  5: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  6. Error: twomoments (@test-basic.r#382) ---------------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: twomoments(MV) at testthat/test-basic.r:382
  2: theta(X, vcov.func = vcov.func, xtag = xtag)
  3: madness(val = mu, vtag = "theta", xtag = xtag, varx = Ohat)
  4: diag(1, nrow = length(val))
  5: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  6: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  7. Error: to_objective (@test-basic.r#403) -------------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: madness(MV) at testthat/test-basic.r:403
  2: diag(1, nrow = length(val))
  3: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  4: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  8. Error: numerical derivative (@test-basic.r#415) -----------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: madness(MV) at testthat/test-basic.r:415
  2: diag(1, nrow = length(val))
  3: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  4: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  9. Error: arith functions (@test-correctness.r#72) -----------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         +x
     }) at testthat/test-correctness.r:72
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  10. Error: bind functions (@test-correctness.r#124) ----------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         cbind(x)
     }) at testthat/test-correctness.r:124
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  11. Error: elwise functions (@test-correctness.r#153) --------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         abs(x)
     }) at testthat/test-correctness.r:153
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  12. Error: matwise functions (@test-correctness.r#171) -------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         sqrtm(x)
     }) at testthat/test-correctness.r:171
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  13. Error: sum functions (@test-correctness.r#189) -----------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         matrix.trace(x)
     }, errtol = 1e-06) at testthat/test-correctness.r:189
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  14. Error: sumprod functions (@test-correctness.r#213) -------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         sum(x, na.rm = na.rm)
     }) at testthat/test-correctness.r:213
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  15. Error: maxmin functions (@test-correctness.r#236) --------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         max(x, na.rm = na.rm)
     }) at testthat/test-correctness.r:236
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  16. Error: outer functions (@test-correctness.r#260) ---------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         outer(x, x, FUN = "*")
     }) at testthat/test-correctness.r:260
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  17. Error: determinants (@test-correctness.r#284) ------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         dt <- determinant(x, logarithm = FALSE)
         dt$modulus
     }, errtol = 1e-06) at testthat/test-correctness.r:284
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  18. Error: reshape functions (@test-correctness.r#295) -------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         t(x)
     }, errtol = 1e-06) at testthat/test-correctness.r:295
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  19. Error: vech/ivech functions (@test-correctness.r#345) ----------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         vec(x)
     }, errtol = 1e-06) at testthat/test-correctness.r:345
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  20. Error: solve functions (@test-correctness.r#380) ---------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         solve(x)
     }, eps = 1e-06, errtol = 1e-06) at testthat/test-correctness.r:380
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  21. Error: eigen functions (@test-correctness.r#399) ---------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         eigen(0.5 * (x + t(x)), symmetric = TRUE)$values
     }, eps = 1e-07, errtol = 1e-06) at testthat/test-correctness.r:399
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  22. Error: norm functions (@test-correctness.r#419) ----------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         norm(x)
     }, errtol = 1e-06) at testthat/test-correctness.r:419
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  23. Error: round one (@test-correctness.r#451) ---------------------------------
  unable to find an inherited method for function 'diag' for signature '"numeric"'
  1: expect_small_err(xval, function(x) {
         norm(crossprod(x), "O")
     }, eps = 1e-07, errtol = 1e-05) at testthat/test-correctness.r:451
  2: expect_less_than(comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps), errtol) at testthat/test-correctness.r:63
  3: expect_lt(...)
  4: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  5: stopifnot(is.numeric(actual), length(actual) == 1)
  6: comp_err(xval, thefun = thefun, scalfun = scalfun, eps = eps)
  7: madness(val = xval, vtag = "x", xtag = "x") at testthat/test-correctness.r:43
  8: diag(1, nrow = length(val))
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), structure(function (x, nrow, ncol) 
     standardGeneric("diag"), generic = structure("diag", package = "madness"), package = "madness", group = list(), valueClass = character(0), signature = c("x", 
     "nrow", "ncol"), default = `\001NULL\001`, skeleton = (function (x, nrow, ncol) 
     stop("invalid call in method dispatch to 'diag' (no default method)", domain = NA))(x, 
         nrow, ncol), class = structure("standardGeneric", package = "methods")), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  testthat results ================================================================
  OK: 53 SKIPPED: 0 FAILED: 23
  1. Error: initialize (@test-basic.r#41) 
  2. Error: initialize errors (@test-basic.r#76) 
  3. Error: basic getters and setters (@test-basic.r#95) 
  4. Error: eigen? (@test-basic.r#347) 
  5. Error: theta (@test-basic.r#357) 
  6. Error: twomoments (@test-basic.r#382) 
  7. Error: to_objective (@test-basic.r#403) 
  8. Error: numerical derivative (@test-basic.r#415) 
  9. Error: arith functions (@test-correctness.r#72) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted