Running 'testthat.R' [13s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(parglm)
  > 
  > test_check("parglm")
  -- 1. Error: 'parglm' works when package is not attached (@test_misc.R#7)  -----
  unused argument (singular.ok = FALSE)
  1: expect_silent(local({
         detach("package:parglm", unload = TRUE, force = TRUE)
         parglm::parglm(mpg ~ gear, data = datasets::mtcars)
         library(parglm)
     }, envir = new.env(parent = environment(glm)))) at testthat/test_misc.R:7
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: local({
         detach("package:parglm", unload = TRUE, force = TRUE)
         parglm::parglm(mpg ~ gear, data = datasets::mtcars)
         library(parglm)
     }, envir = new.env(parent = environment(glm)))
  10: eval.parent(substitute(eval(quote(expr), envir)))
  ...
  13: eval(quote({
         detach("package:parglm", unload = TRUE, force = TRUE)
         parglm::parglm(mpg ~ gear, data = datasets::mtcars)
         library(parglm)
     }), new.env(parent = environment(glm)))
  14: eval(quote({
         detach("package:parglm", unload = TRUE, force = TRUE)
         parglm::parglm(mpg ~ gear, data = datasets::mtcars)
         library(parglm)
     }), new.env(parent = environment(glm)))
  15: parglm::parglm(mpg ~ gear, data = datasets::mtcars) at testthat/test_misc.R:10
  16: eval(cl, parent.frame())
  17: eval(cl, parent.frame())
  18: glm(formula = mpg ~ gear, data = datasets::mtcars, method = parglm::parglm.fit, singular.ok = FALSE)
  19: eval(call(if (is.function(method)) "method" else method, x = X, y = Y, weights = weights, 
         start = start, etastart = etastart, mustart = mustart, offset = offset, family = family, 
         control = control, intercept = attr(mt, "intercept") > 0L))
  20: eval(call(if (is.function(method)) "method" else method, x = X, y = Y, weights = weights, 
         start = start, etastart = etastart, mustart = mustart, offset = offset, family = family, 
         control = control, intercept = attr(mt, "intercept") > 0L))
  21: method(x = structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 
     3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 4), .Dim = c(32L, 2L), .Dimnames = list(
         c("Mazda RX4", "Mazda RX4 Wag", "Datsun 710", "Hornet 4 Drive", "Hornet Sportabout", 
         "Valiant", "Duster 360", "Merc 240D", "Merc 230", "Merc 280", "Merc 280C", "Merc 450SE", 
         "Merc 450SL", "Merc 450SLC", "Cadillac Fleetwood", "Lincoln Continental", "Chrysler Imperial", 
         "Fiat 128", "Honda Civic", "Toyota Corolla", "Toyota Corona", "Dodge Challenger", 
         "AMC Javelin", "Camaro Z28", "Pontiac Firebird", "Fiat X1-9", "Porsche 914-2", 
         "Lotus Europa", "Ford Pantera L", "Ferrari Dino", "Maserati Bora", "Volvo 142E"
         ), c("(Intercept)", "gear")), assign = 0:1), y = structure(c(21, 21, 22.8, 21.4, 
     18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, 
     30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26, 30.4, 15.8, 19.7, 15, 21.4), .Names = c("Mazda RX4", 
     "Mazda RX4 Wag", "Datsun 710", "Hornet 4 Drive", "Hornet Sportabout", "Valiant", 
     "Duster 360", "Merc 240D", "Merc 230", "Merc 280", "Merc 280C", "Merc 450SE", "Merc 450SL", 
     "Merc 450SLC", "Cadillac Fleetwood", "Lincoln Continental", "Chrysler Imperial", 
     "Fiat 128", "Honda Civic", "Toyota Corolla", "Toyota Corona", "Dodge Challenger", 
     "AMC Javelin", "Camaro Z28", "Pontiac Firebird", "Fiat X1-9", "Porsche 914-2", "Lotus Europa", 
     "Ford Pantera L", "Ferrari Dino", "Maserati Bora", "Volvo 142E")), weights = NULL, 
         start = NULL, etastart = NULL, mustart = NULL, offset = NULL, family = structure(list(
             family = "gaussian", link = "identity", linkfun = function (mu) 
             mu, linkinv = function (eta) 
             eta, variance = function (mu) 
             rep.int(1, length(mu)), dev.resids = function (y, mu, wt) 
             wt * ((y - mu)^2), aic = function (y, n, mu, wt, dev) 
             {
                 nobs <- length(y)
                 nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt))
             }, mu.eta = function (eta) 
             rep.int(1, length(eta)), initialize = expression({
                 n <- rep.int(1, nobs)
                 if (is.null(etastart) && is.null(start) && is.null(mustart) && ((family$link == 
                     "inverse" && any(y == 0)) || (family$link == "log" && any(y <= 0)))) 
                     stop("cannot find valid starting values: please specify some")
                 mustart <- y
             }), validmu = function (mu) 
             TRUE, valideta = function (eta) 
             TRUE), .Names = c("family", "link", "linkfun", "linkinv", "variance", "dev.resids", 
         "aic", "mu.eta", "initialize", "validmu", "valideta"), class = "family"), control = structure(list(
             singular.ok = FALSE), .Names = "singular.ok"), intercept = TRUE)
  22: do.call("parglm.control", control)
  
  -- 2. Error: Using more threads then rows yields a warning (@test_misc.R#20)  --
  unused argument (singular.ok = FALSE)
  1: expect_warning(parglm(a ~ b - 1, data = this_df, nthreads = 64), regexp = "Too few observation compared to the number of threads. 2 thread(s) will be used instead of 64.", 
         fixed = TRUE) at testthat/test_misc.R:20
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: parglm(a ~ b - 1, data = this_df, nthreads = 64)
  7: eval(cl, parent.frame())
  8: eval(cl, parent.frame())
  9: glm(formula = a ~ b - 1, data = this_df, nthreads = 64, method = parglm::parglm.fit, 
         singular.ok = FALSE)
  10: eval(call(if (is.function(method)) "method" else method, x = X, y = Y, weights = weights, 
         start = start, etastart = etastart, mustart = mustart, offset = offset, family = family, 
         control = control, intercept = attr(mt, "intercept") > 0L))
  11: eval(call(if (is.function(method)) "method" else method, x = X, y = Y, weights = weights, 
         start = start, etastart = etastart, mustart = mustart, offset = offset, family = family, 
         control = control, intercept = attr(mt, "intercept") > 0L))
  12: method(x = structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
     ), .Dim = c(20L, 1L), .Dimnames = list(c("1", "2", "3", "4", "5", "6", "7", "8", 
     "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"), "b"), assign = 1L), 
         y = structure(c(4670.29, 1967.5, 6064.39, 4441.72, 9264.79, 9430.74, 7661.07, 
         128.84, 1896.3, 7660.95, 7960.26, 1596.88, 3041.9, 9511.68, 5213.96, 373.66, 
         4341.31, 4028.21, 4604.13, 1049.7), .Names = c("1", "2", "3", "4", "5", "6", 
         "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"
         )), weights = NULL, start = NULL, etastart = NULL, mustart = NULL, offset = NULL, 
         family = structure(list(family = "gaussian", link = "identity", linkfun = function (mu) 
         mu, linkinv = function (eta) 
         eta, variance = function (mu) 
         rep.int(1, length(mu)), dev.resids = function (y, mu, wt) 
         wt * ((y - mu)^2), aic = function (y, n, mu, wt, dev) 
         {
             nobs <- length(y)
             nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt))
         }, mu.eta = function (eta) 
         rep.int(1, length(eta)), initialize = expression({
             n <- rep.int(1, nobs)
             if (is.null(etastart) && is.null(start) && is.null(mustart) && ((family$link == 
                 "inverse" && any(y == 0)) || (family$link == "log" && any(y <= 0)))) 
                 stop("cannot find valid starting values: please specify some")
             mustart <- y
         }), validmu = function (mu) 
         TRUE, valideta = function (eta) 
         TRUE), .Names = c("family", "link", "linkfun", "linkinv", "variance", "dev.resids", 
         "aic", "mu.eta", "initialize", "validmu", "valideta"), class = "family"), control = structure(list(
             nthreads = 64, singular.ok = FALSE), .Names = c("nthreads", "singular.ok"
         )), intercept = FALSE)
  13: do.call("parglm.control", control)
  
  
  error: chol(): decomposition failed
  == testthat results  ===========================================================
  OK: 1317 SKIPPED: 0 FAILED: 2
  1. Error: 'parglm' works when package is not attached (@test_misc.R#7) 
  2. Error: Using more threads then rows yields a warning (@test_misc.R#20) 
  
  Error: testthat unit tests failed
  Execution halted