Running ‘testthat.R’ [6s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(glmmsr)
  > 
  > test_check("glmmsr")
  
   *** caught segfault ***
  address 208, cause 'memory not mapped'
  
  Traceback:
   1: callSuper(...)
   2: .Object$initialize(...)
   3: initialize(value, ...)
   4: initialize(value, ...)
   5: (function (Class, ...) {    ClassDef <- getClass(Class, where = topenv(parent.frame()))    value <- .Call(C_new_object, ClassDef)    initialize(value, ...)})(Class = "glmResp", family = list(family = "binomial", link = "logit",     linkfun = function (mu)     .Call(C_logit_link, mu), linkinv = function (eta)     .Call(C_logit_linkinv, eta), variance = function (mu)     mu * (1 - mu), dev.resids = function (y, mu, wt)     .Call(C_binomial_dev_resids, y, mu, wt), aic = function (y,         n, mu, wt, dev)     {        m <- if (any(n > 1))             n        else wt        -2 * sum(ifelse(m > 0, (wt/m), 0) * dbinom(round(m *             y), round(m), mu, log = TRUE))    }, mu.eta = function (eta)     .Call(C_logit_mu_eta, eta), initialize = expression({        if (NCOL(y) == 1) {            if (is.factor(y))                 y <- y != levels(y)[1L]            n <- rep.int(1, nobs)            y[weights == 0] <- 0            if (any(y < 0 | y > 1))                 stop("y values must be 0 <= y <= 1")            mustart <- (weights * y + 0.5)/(weights + 1)            m <- weights * y            if (any(abs(m - round(m)) > 0.001))                 warning("non-integer #successes in a binomial glm!")        }        else if (NCOL(y) == 2) {            if (any(abs(y - round(y)) > 0.001))                 warning("non-integer counts in a binomial glm!")            n <- y[, 1] + y[, 2]            y <- ifelse(n == 0, 0, y[, 1]/n)            weights <- weights * n            mustart <- (n * y + 0.5)/(n + 1)        }        else stop("for the 'binomial' family, y must be a vector of 0 and 1's\nor a 2 column matrix where col 1 is no. successes and col 2 is no. failures")    }), validmu = function (mu)     all(is.finite(mu)) && all(mu > 0 & mu < 1), valideta = function (eta)     TRUE, simulate = function (object, nsim)     {        ftd <- fitted(object)        n <- length(ftd)        ntot <- n * nsim        wts <- object$prior.weights        if (any(wts%%1 != 0))             stop("cannot simulate from non-integer prior.weights")        if (!is.null(m <- object$model)) {            y <- model.response(m)            if (is.factor(y)) {                yy <- factor(1 + rbinom(ntot, size = 1, prob = ftd),                   labels = levels(y))                split(yy, rep(seq_len(nsim), each = n))            }            else if (is.matrix(y) && ncol(y) == 2) {                yy <- vector("list", nsim)                for (i in seq_len(nsim)) {                  Y <- rbinom(n, size = wts, prob = ftd)                  YY <- cbind(Y, wts - Y)                  colnames(YY) <- colnames(y)                  yy[[i]] <- YY                }                yy            }            else rbinom(ntot, size = wts, prob = ftd)/wts        }        else rbinom(ntot, size = wts, prob = ftd)/wts    }), y = c(1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0), start = NULL, offset = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), etastart = NULL, n = 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, 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, 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), weights = 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, 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, 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))
   6: do.call(new, c(list(Class = "glmResp", family = family), ll[setdiff(names(ll),     c("m", "nobs", "mustart"))]))
   7: mkRespMod(fr, family = family)
   8: lme4::mkGlmerDevfun(fr = modfr$fr, X = modfr$X, reTrms = modfr$reTrms,     family = modfr$family, control = lme4_control())
   9: find_lfun_glmm_internal(modfr, method = method, control = con)
  10: glmm(formula, subform, data = data_no_1, family = binomial, method = "Laplace",     verbose = 0)
  11: eval(expr, envir, enclos)
  12: eval(code, test_env)
  13: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
  14: doTryCatch(return(expr), name, parentenv, handler)
  15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  17: doTryCatch(return(expr), name, parentenv, handler)
  18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  21: test_code(desc, code, env = parent.frame())
  22: test_that("OK if don't use all rows of X", {    player1_no_1 <- factor(rep(3:11, 10), levels = 1:12)    player2_no_1 <- factor(rep(2:10, 10), levels = 1:12)    player1_no_1_num <- rep(3:11, 10)    player2_no_1_num <- rep(2:10, 10)    data_no_1 <- list(x = c(x[1], x, x[1]), player1 = player1_no_1,         player2 = player2_no_1)    data_no_1_num <- list(x = c(x[1], x, x[1]), player1 = player1_no_1_num,         player2 = player2_no_1_num)    fit_no_1 <- glmm(formula, subform, data = data_no_1, family = binomial,         method = "Laplace", verbose = 0)    expect_equal(fit$estim, fit_no_1$estim)    expect_equal(fit$Sigma, fit_no_1$Sigma)    fit_no_1_num <- glmm(formula, subform, data = data_no_1_num,         family = binomial, method = "Laplace", verbose = 0)    expect_equal(fit$estim, fit_no_1_num$estim)    expect_equal(fit$Sigma, fit_no_1_num$Sigma)})
  23: eval(expr, envir, enclos)
  24: eval(exprs, env)
  25: source_file(path, new.env(parent = env), chdir = TRUE)
  26: force(code)
  27: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  28: FUN(X[[i]], ...)
  29: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  30: force(code)
  31: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  32: test_files(paths, reporter = reporter, env = env, ...)
  33: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  34: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  35: run_tests(package, test_path, filter, reporter, ...)
  36: test_check("glmmsr")
  An irrecoverable exception occurred. R is aborting now ...