Running 'runit.R' [10s]
  Running 'testthat.R' [2s]
Running the tests in 'tests/runit.R' failed.
Complete output:
  > #!/usr/bin/Rscript --vanilla
  > is_failure <- function(result) {
  +     res <- RUnit::getErrors(result)
  +     names(res) <- tolower(names(res)) # soothe lintr
  +     sum_of_exceptions <- res[["nerr"]] + res[["nfail"]]
  +     fail <- as.logical(sum_of_exceptions)
  +     return(fail)
  + }
  > 
  > if (interactive()) {
  +     pkgload::load_all(path = ".") # needed to use pkgload's shim version of
  +     # base's system.file
  +     unit_dir <- system.file("inst", "runit_tests", package = "maSAE")
  + } else {
  +     require("maSAE", quietly = TRUE, character.only = TRUE) ||
  +         pkgload::load_all(path = ".") # needed to use pkgload's shim version of
  +     r_call <- commandArgs(trailingOnly = FALSE)
  +     if (any(grepl("--file", r_call))) {
  +         unit_dir <- file.path("inst", "runit_tests")
  +     } else {
  +         unit_dir <- system.file("runit_tests", package = "maSAE")
  +     }
  + }
  
  Attaching package: 'maSAE'
  
  The following object is masked from 'package:stats':
  
      predict
  
  > if (! dir.exists(unit_dir)) {
  +     stop("Can not find RUnit test directory ", unit_dir,
  +          ". Try to (re)install the package first.")
  + }
  > setup_file <- file.path(unit_dir, "setup.R")
  > if (file.exists(setup_file)) source(setup_file)
  > package_suite <- RUnit::defineTestSuite("maSAE_unit_test",
  +                                         dirs = unit_dir,
  +                                         testFileRegexp = "^runit.*\\.[rR]",
  +                                         testFuncRegexp = "^test_+")
  > test_result <- RUnit::runTestSuite(package_suite)
  Tests for the clustered two-phase design
  
  
  Executing test function test_ex_noweights  ... Tests for exhaustive auxiliary data without weights
  include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  
  
  Executing test function test_ex_weights  ... Tests for exhaustive auxiliary data with weights
  include is NULL, automatically adding it as TRUE to data.
  Error in validObject(.Object) : 
    invalid class "saeObj" object: s2 indicator s2 not found in data.
  include is NULL, automatically adding it as TRUE to data.
  include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  
  
  Executing test function test_nonex_noweights  ... Tests for non-exhaustive auxiliary data without weights
   done successfully.
  
  
  
  Executing test function test_partially  ... include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  Tests for the clustered three-phase design
  
  
  Executing test function test_ex_noweights  ... Tests for exhaustive auxiliary data without weights
  include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  
  
  Executing test function test_nonex_noweights  ... Tests for non-exhaustive auxiliary data without weights
   done successfully.
  
  #% Tests against forestinventory
  ##% Tests for using zberg
  
  
  Executing test function test_unclustered_unweighted  ... Timing stopped at: 0.08 0 0.07
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
   done successfully.
  
  
  
  Executing test function test_unclustered_weighted  ... Timing stopped at: 0.06 0 0.07
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  In addition: Warning messages:
  1: In Ops.factor(left, right) : '*' not meaningful for factors
  2: In Ops.factor(left, right) : '*' not meaningful for factors
  3: In Ops.factor(left, right) : '*' not meaningful for factors
   done successfully.
  
  #% Tests against forestinventory
  ##% Tests for clustered sampling using s1, s2
  
  
  Executing test function test_clustered_unweighted  ... include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  Tests for the clustered two-phase design
  
  
  Executing test function test_partially_exhaustive_auxiliary_information  ...  done successfully.
  
  Tests for using lm
  
  
  Executing test function test_lm_clustered  ... include is NULL, automatically adding it as TRUE to data.
  Timing stopped at: 0.15 0 0.16
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
   done successfully.
  
  
  
  Executing test function test_lm_unclustered  ... Timing stopped at: 0.09 0 0.09
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
   done successfully.
  
  Tests for using lm
  
  
  Executing test function test_means  ... Timing stopped at: 0 0 0
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
   done successfully.
  
  
  
  Executing test function test_exception  ... Error in eval(expr, envir = parent.frame()) : Hello, error!
   done successfully.
  
  Tests for the unclustered two-phase design
  
  
  Executing test function test_ex_noweights  ... Tests for exhaustive auxiliary data without weights
   done successfully.
  
  
  
  Executing test function test_ex_weights  ... Tests for exhaustive auxiliary data with weights
  Error in validityMethod(object) : 
    (converted from warning) Got both all true means and auxiliary weights. Will ignore the latter.
   done successfully.
  
  
  
  Executing test function test_nonex_noweights  ... Tests for non-exhaustive auxiliary data without weights
   done successfully.
  
  
  
  Executing test function test_nonex_weights  ... Tests for non-exhaustive auxiliary data with weights
   done successfully.
  
  
  
  Executing test function test_partially  ...  done successfully.
  
  Tests for the unclustered three-phase design
  
  
  Executing test function test_ex_noweights  ... Tests for exhaustive auxiliary data without weights
  n(s0) >> n(s1) should hold, but you've given s1 resulting in n(s1)/n(s0) =  0.418300653594771
  Error in validObject(.Object) : 
    invalid class "saeObj" object: Got both all true means and s1. If the null phase was exhaustive, then you don't need it's data!
   done successfully.
  
  
  
  Executing test function test_ex_weights  ... Tests for exhaustive auxiliary data with weights
  n(s0) >> n(s1) should hold, but you've given s1 resulting in n(s1)/n(s0) =  0.418300653594771
  Error in validObject(.Object) : 
    invalid class "saeObj" object: Got both all true means and s1. If the null phase was exhaustive, then you don't need it's data!
   done successfully.
  
  
  
  Executing test function test_nonex_noweights  ... Tests for non-exhaustive auxiliary data without weights
  n(s0) >> n(s1) should hold, but you've given s1 resulting in n(s1)/n(s0) =  0.418300653594771
   done successfully.
  
  
  
  Executing test function test_nonex_weights  ... Tests for non-exhaustive auxiliary data with weights
  n(s0) >> n(s1) should hold, but you've given s1 resulting in n(s1)/n(s0) =  0.418300653594771
   done successfully.
  
  Ensure 1.0.0 and 2.0.0 give same predictions and variances
  
  
  Executing test function test_lm_clustered  ... include is NULL, automatically adding it as TRUE to data.
  include is NULL, automatically adding it as TRUE to data.
  include is NULL, automatically adding it as TRUE to data.
  include is NULL, automatically adding it as TRUE to data.
   done successfully.
  
  
  
  Executing test function test_lm_unclustered  ...  done successfully.
  
  > RUnit::printTextProtocol(test_result, showDetails = TRUE, fileName = "")
  RUNIT TEST PROTOCOL -- Sat Mar 14 17:32:16 2020 
  *********************************************** 
  Number of test functions: 25 
  Number of errors: 5 
  Number of failures: 0 
  
   
  1 Test Suite : 
  maSAE_unit_test - 25 test functions, 5 errors, 0 failures
  ERROR in test_unclustered_unweighted: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_unclustered_weighted: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_lm_clustered: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_lm_unclustered: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_means: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  
  
  
  Details 
  *************************** 
  Test Suite: maSAE_unit_test 
  Test function regexp: ^test_+ 
  Test file regexp: ^runit.*\.[rR] 
  Involved directory: 
  D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests 
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-cl_2p.R 
  test_ex_noweights: (3 checks) ... OK (0.23 seconds)
  test_ex_weights: (2 checks) ... OK (0.16 seconds)
  test_nonex_noweights: (3 checks) ... OK (0.09 seconds)
  test_partially: (1 checks) ... OK (0.11 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-cl_3p.R 
  test_ex_noweights: (3 checks) ... OK (0.31 seconds)
  test_nonex_noweights: (1 checks) ... OK (0.56 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory.R 
  test_unclustered_unweighted: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  test_unclustered_weighted: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory_maSAE.R 
  test_clustered_unweighted: (1 checks) ... OK (0.23 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory_partially.R 
  test_partially_exhaustive_auxiliary_information: (1 checks) ... OK (0.25 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-lm.R 
  test_lm_clustered: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  test_lm_unclustered: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-means.R 
  test_means: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-throw.R 
  test_exception: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-uc_2p.R 
  test_ex_noweights: (3 checks) ... OK (0.1 seconds)
  test_ex_weights: (2 checks) ... OK (0.17 seconds)
  test_nonex_noweights: (3 checks) ... OK (0.08 seconds)
  test_nonex_weights: (3 checks) ... OK (0.07 seconds)
  test_partially: (3 checks) ... OK (0.29 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-uc_3p.R 
  test_ex_noweights: (1 checks) ... OK (0.01 seconds)
  test_ex_weights: (1 checks) ... OK (0 seconds)
  test_nonex_noweights: (5 checks) ... OK (0.16 seconds)
  test_nonex_weights: (5 checks) ... OK (0.15 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-v1.R 
  test_lm_clustered: (4 checks) ... OK (3.69 seconds)
  test_lm_unclustered: (4 checks) ... OK (1.03 seconds)
  > if (is_failure(test_result)) {
  +     RUnit::printTextProtocol(test_result, showDetails = TRUE)
  +     stop("RUnit failed.")
  + }
  RUNIT TEST PROTOCOL -- Sat Mar 14 17:32:16 2020 
  *********************************************** 
  Number of test functions: 25 
  Number of errors: 5 
  Number of failures: 0 
  
   
  1 Test Suite : 
  maSAE_unit_test - 25 test functions, 5 errors, 0 failures
  ERROR in test_unclustered_unweighted: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_unclustered_weighted: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_lm_clustered: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_lm_unclustered: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  ERROR in test_means: Error : 'DF2formula' is not an exported object from 'namespace:stats'
  
  
  
  Details 
  *************************** 
  Test Suite: maSAE_unit_test 
  Test function regexp: ^test_+ 
  Test file regexp: ^runit.*\.[rR] 
  Involved directory: 
  D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests 
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-cl_2p.R 
  test_ex_noweights: (3 checks) ... OK (0.23 seconds)
  test_ex_weights: (2 checks) ... OK (0.16 seconds)
  test_nonex_noweights: (3 checks) ... OK (0.09 seconds)
  test_partially: (1 checks) ... OK (0.11 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-cl_3p.R 
  test_ex_noweights: (3 checks) ... OK (0.31 seconds)
  test_nonex_noweights: (1 checks) ... OK (0.56 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory.R 
  test_unclustered_unweighted: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  test_unclustered_weighted: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory_maSAE.R 
  test_clustered_unweighted: (1 checks) ... OK (0.23 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-forestinventory_partially.R 
  test_partially_exhaustive_auxiliary_information: (1 checks) ... OK (0.25 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-lm.R 
  test_lm_clustered: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  test_lm_unclustered: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-means.R 
  test_means: ERROR !! 
  Error : 'DF2formula' is not an exported object from 'namespace:stats'
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-throw.R 
  test_exception: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-uc_2p.R 
  test_ex_noweights: (3 checks) ... OK (0.1 seconds)
  test_ex_weights: (2 checks) ... OK (0.17 seconds)
  test_nonex_noweights: (3 checks) ... OK (0.08 seconds)
  test_nonex_weights: (3 checks) ... OK (0.07 seconds)
  test_partially: (3 checks) ... OK (0.29 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-uc_3p.R 
  test_ex_noweights: (1 checks) ... OK (0.01 seconds)
  test_ex_weights: (1 checks) ... OK (0 seconds)
  test_nonex_noweights: (5 checks) ... OK (0.16 seconds)
  test_nonex_weights: (5 checks) ... OK (0.15 seconds)
  --------------------------- 
  Test file: D:/temp/RtmpgpWObH/RLIBS_19c983cf931b8/maSAE/runit_tests/runit-v1.R 
  test_lm_clustered: (4 checks) ... OK (3.69 seconds)
  test_lm_unclustered: (4 checks) ... OK (1.03 seconds)
  Error: RUnit failed.
  Execution halted