Running ‘testthat.R’ [7s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  Binned data in 0.336 seconds
  Binned data in 0.01 seconds
  Binned data in 0.107 seconds
  
   *** caught segfault ***
  address 0x2, cause 'memory not mapped'
  
  Traceback:
   1: .External("mergeXts", all = all[1:2], fill = fill, setclass = setclass,     symnames = symnames, suffixes = suffixes, retside = retside,     env = new.env(), tzone = tzone, ..., PACKAGE = "xts")
   2: merge.xts(..., all = all, fill = fill, suffixes = suffixes)
   3: cbind(deparse.level, ...)
   4: cbind(x@time, 1:nrow(x@time))
   5: space_time_grid[1:5, 1:3]
   6: space_time_grid[1:5, 1:3]
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: 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) {})
  17: test_code(desc, code, env = parent.frame())
  18: test_that("SpaceTime_BAUs", {    library(sp)    library(spacetime)    sim_process <- expand.grid(x = seq(0.005, 0.995, by = 0.1),         y = seq(0.005, 0.995, by = 0.1), t = seq(1, 5, by = 1),         std = 0.5)    sim_process$z <- 1    time1 <- as.POSIXct("2015-09-01", tz = "") + 3600 * 24 *         (sim_process$t - 1)    space1 <- sim_process[, c("x", "y")]    coordinates(space1) <- ~x + y    STobj1 <- STIDF(space1, time1, data = sim_process)    time_grid <- auto_BAUs(real_line(), cellsize = 1, d = as.Date(time(STobj1)),         tunit = "days")    expect_is(time_grid, "POSIXct")    if (require("INLA")) {        space_time_grid <- auto_BAUs(STplane(), type = "hex",             cellsize = c(0.1, 0.1, 1), data = STobj1, tunit = "days",             convex = -0.2, nonconvex_hull = TRUE)        expect_is(space_time_grid, "STFDF")        expect_is(time(space_time_grid), "POSIXct")    }    space_time_grid <- auto_BAUs(STplane(), type = "hex", cellsize = c(0.1,         0.1, 1), data = STobj1, tunit = "days", convex = -0.2,         nonconvex_hull = FALSE)    expect_is(space_time_grid, "STFDF")    expect_is(time(space_time_grid), "POSIXct")    STobj2 <- space_time_grid[1:5, 1:3]    STobj2$z <- 1    f <- z ~ 1    binned_data1 <- FRK:::map_data_to_BAUs(STobj1, space_time_grid,         average_in_BAU = TRUE)    binned_data2 <- FRK:::map_data_to_BAUs(STobj1, space_time_grid,         average_in_BAU = FALSE)    expect_true(ncol(binned_data2) >= ncol(binned_data1))    expect_is(binned_data1, "STIDF")    expect_is(binned_data2, "STIDF")    C1 <- BuildC(binned_data1, space_time_grid)    C2 <- BuildC(binned_data2, space_time_grid)    expect_is(C1, "list")    expect_is(C2, "list")    expect_equal(names(C1), c("i_idx", "j_idx"))    expect_equal(names(C2), c("i_idx", "j_idx"))    expect_equal(length(C1$i_idx), as.numeric(nrow(binned_data1)))    expect_equal(length(C1$j_idx), as.numeric(nrow(binned_data1)))    STobj3 <- STIDF(space1, time1 + 4000, data = sim_process)    STobj3$z <- 1    f <- z ~ 1    binned_data3 <- FRK:::map_data_to_BAUs(STobj3, space_time_grid,         average_in_BAU = TRUE)    binned_data4 <- FRK:::map_data_to_BAUs(STobj3, space_time_grid,         average_in_BAU = FALSE)    expect_true(ncol(binned_data4) >= ncol(binned_data3))    expect_is(binned_data3, "STIDF")    expect_is(binned_data4, "STIDF")    space_time_grid2 <- auto_BAUs(STplane(), type = "hex", cellsize = c(0.1,         0.1, 1), data = STobj3, tunit = "days", convex = -0.2,         nonconvex_hull = FALSE)    expect_equal(attr(space_time_grid@time, "tzone"), attr(STobj1@time,         "tzone"))})
  19: eval(exprs, env)
  20: eval(exprs, env)
  21: source_file(path, new.env(parent = env), chdir = TRUE)
  22: force(code)
  23: 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()    })
  24: FUN(X[[i]], ...)
  25: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  26: force(code)
  27: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  28: test_files(paths, reporter = reporter, env = env, ...)
  29: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  30: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  31: run_tests(package, test_path, filter, reporter, ...)
  32: test_check("FRK")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault