Running ‘testthat.R’ [5s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check('autovarCore')
  Loading required package: autovarCore
  1. Error: autovar function returns hello world (@test_autovar.r#14) ------------
  incorrect number of subscripts on matrix
  1: with_mock(`parallel::clusterMap` = function(cluster, ...) {
         mapply(...)
     }, `parallel::makeCluster` = function(...) {
         NULL
     }, `parallel::stopCluster` = function(...) {
         NULL
     }, expect_equal(class(autovar(testdata_raw_dataframe(), selected_column_names = c("rumination", 
         "happiness", "activity"), imputation_iterations = 1)), "list")) at testthat/test_autovar.r:14
  2: eval(expression, parent.frame())
  3: eval(expression, parent.frame())
  4: expect_equal(class(autovar(testdata_raw_dataframe(), selected_column_names = c("rumination", 
         "happiness", "activity"), imputation_iterations = 1)), "list")
  5: compare(object, expected, ...)
  6: autovar(testdata_raw_dataframe(), selected_column_names = c("rumination", "happiness", 
         "activity"), imputation_iterations = 1)
  7: impute_datamatrix(data_matrix, params$measurements_per_day, params$imputation_iterations)
  8: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  9: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  10: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  11: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  2. Error: impute_datamatrix returns a matrix of the correct dimensions (@test_impute_datamatrix.r#30) 
  incorrect number of subscripts on matrix
  1: autovarCore:::impute_datamatrix(input_matrix, 1, test_imputation_iterations) at testthat/test_impute_datamatrix.r:30
  2: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  3: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  4: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  5: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  3. Error: impute_datamatrix works for a column with just one value not NA (@test_impute_datamatrix.r#40) 
  incorrect number of subscripts on matrix
  1: expect_equal(sum(is.na(autovarCore:::impute_datamatrix(input_matrix, 3, test_imputation_iterations))), 
         0) at testthat/test_impute_datamatrix.r:40
  2: compare(object, expected, ...)
  3: autovarCore:::impute_datamatrix(input_matrix, 3, test_imputation_iterations)
  4: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  5: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  6: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  7: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  4. Error: impute_datamatrix imputes all missing values (@test_impute_datamatrix.r#50) 
  incorrect number of subscripts on matrix
  1: expect_equal(sum(is.na(autovarCore:::impute_datamatrix(input_matrix, 1, 1))), 0) at testthat/test_impute_datamatrix.r:50
  2: compare(object, expected, ...)
  3: autovarCore:::impute_datamatrix(input_matrix, 1, 1)
  4: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  5: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  6: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  7: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  5. Error: impute_datamatrix does not change non missings (@test_impute_datamatrix.r#63) 
  incorrect number of subscripts on matrix
  1: expect_less_than(sum(abs(input_matrix - autovarCore:::impute_datamatrix(input_matrix, 
         1, test_imputation_iterations)), na.rm = TRUE), 1e-04) at testthat/test_impute_datamatrix.r:63
  2: expect_lt(...)
  3: expect_compare("<", object, expected, label = label, expected.label = expected.label)
  4: stopifnot(is.numeric(actual), length(actual) == 1)
  5: withCallingHandlers(tryCatch(...elt(i), error = function(e) {
         e$call <- cl.i
         stop(e)
     }), warning = function(w) {
         w$call <- cl.i
         w
     })
  6: tryCatch(...elt(i), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  6. Error: impute_datamatrix is able to handle constant columns (@test_impute_datamatrix.r#73) 
  incorrect number of subscripts on matrix
  1: autovarCore:::impute_datamatrix(input_matrix, 1, test_imputation_iterations) at testthat/test_impute_datamatrix.r:73
  2: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  3: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  4: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  5: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  7. Error: impute_datamatrix is able to handle some columns not having missing values (@test_impute_datamatrix.r#90) 
  incorrect number of subscripts on matrix
  1: autovarCore:::impute_datamatrix(input_matrix, 1, test_imputation_iterations) at testthat/test_impute_datamatrix.r:90
  2: amelia(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  3: amelia.default(variable_part, tol = tolerance, ts = time_variable_name, lags = column_numbers_of_lagged_variables, 
         noms = nominal_variables, polytime = power_of_the_imputation_polynomial, p2s = output_detail, 
         empri = level_of_empirical_prior, autopri = allow_increasing_empirical_prior)
  4: amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ts = ts, cs = cs, tolerance = tolerance, 
         polytime = polytime, splinetime = splinetime, lags = lags, leads = leads, logs = logs, 
         sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend, intercs = intercs, 
         noms = noms, startvals = startvals, ords = ords, incheck = incheck, collect = collect, 
         arglist = arglist, priors = priors, autopri = autopri, bounds = bounds, max.resample = max.resample, 
         overimp = overimp, emburn = emburn, boot.type = boot.type)
  5: amsubset(d.trans$x, idvars = numopts$idvars, p2s = p2s, ts = numopts$ts, cs = numopts$cs, 
         polytime = polytime, splinetime = splinetime, intercs = intercs, noms = numopts$noms, 
         priors = priors, bounds = bounds, lags = numopts$lags, leads = numopts$leads, 
         overimp = overimp)
  
  testthat results ================================================================
  OK: 479 SKIPPED: 0 FAILED: 7
  1. Error: autovar function returns hello world (@test_autovar.r#14) 
  2. Error: impute_datamatrix returns a matrix of the correct dimensions (@test_impute_datamatrix.r#30) 
  3. Error: impute_datamatrix works for a column with just one value not NA (@test_impute_datamatrix.r#40) 
  4. Error: impute_datamatrix imputes all missing values (@test_impute_datamatrix.r#50) 
  5. Error: impute_datamatrix does not change non missings (@test_impute_datamatrix.r#63) 
  6. Error: impute_datamatrix is able to handle constant columns (@test_impute_datamatrix.r#73) 
  7. Error: impute_datamatrix is able to handle some columns not having missing values (@test_impute_datamatrix.r#90) 
  
  Error: testthat unit tests failed
  Execution halted