Running ‘globalRecoding_test.R’
  Running ‘reporting_test.R’
  Running ‘testhat.R’ [23s/19s]
Running the tests in ‘tests/reporting_test.R’ failed.
Complete output:
  > require(sdcMicro)
  Loading required package: sdcMicro
  --------
  This is sdcMicro v5.6.1.
  For references, please have a look at citation('sdcMicro')
  Note: since version 5.0.0, the graphical user-interface is a shiny-app that can be started with sdcApp().
  Please submit suggestions and bugs at: https://github.com/sdcTools/sdcMicro/issues
  --------
  > set.seed(199723)
  > activedataset <- testdata
  > sdcObject <- createSdcObj(activedataset, keyVars=c("urbrur", "roof", "sex", "age"),
  +   numVars=c("expend", "income", "savings"),
  +   weightVar=c("sampling_weight"), hhId=c("ori_hid"))
  Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : 
    is.atomic(x) is not TRUE
  Calls: createSdcObj ... dRiskX -> dRiskWORK -> apply -> FUN -> var -> stopifnot
  Execution halted
Running the tests in ‘tests/testhat.R’ failed.
Complete output:
  > library(testthat)
  > library(sdcMicro)
  --------
  This is sdcMicro v5.6.1.
  For references, please have a look at citation('sdcMicro')
  Note: since version 5.0.0, the graphical user-interface is a shiny-app that can be started with sdcApp().
  Please submit suggestions and bugs at: https://github.com/sdcTools/sdcMicro/issues
  --------
  > 
  > test_check("sdcMicro")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_addNoise.R:65:3): data frame, numeric values (noise = default, outdect method) ──
  Error in `FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...)`: non-numeric argument to binary operator
  Backtrace:
      █
   1. └─sdcMicro::addNoise(sample_Data, method = "outdect") test_addNoise.R:65:2
   2.   ├─sdcMicro:::addNoiseX(...)
   3.   └─sdcMicro:::addNoiseX(...)
   4.     └─sdcMicro:::addNoiseWORK(...)
   5.       └─sdcMicro:::addNoise_outdect(x = x, noise = noise)
   6.         └─stats::mahalanobis(x, xMcd$center, xMcd$cov)
   7.           └─base::sweep(x, 2L, center)
  ── Error (test_addNoise.R:125:3): data frame, numeric values with some NAs (noise = default, outdect method) ──
  Error in `FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...)`: non-numeric argument to binary operator
  Backtrace:
      █
   1. └─sdcMicro::addNoise(sample_Data, method = "outdect") test_addNoise.R:125:2
   2.   ├─sdcMicro:::addNoiseX(...)
   3.   └─sdcMicro:::addNoiseX(...)
   4.     └─sdcMicro:::addNoiseWORK(...)
   5.       └─sdcMicro:::addNoise_outdect(x = x, noise = noise)
   6.         └─stats::mahalanobis(x, xMcd$center, xMcd$cov)
   7.           └─base::sweep(x, 2L, center)
  ── Error (test_addNoise.R:214:1): (code run outside of `test_that()`) ──────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_addNoise.R:214:0
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_calcRisks.R:12:1): (code run outside of `test_that()`) ──────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_calcRisks.R:12:0
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_dataGen.R:37:3): sdc without missing) ───────────────────────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_dataGen.R:37:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_localSupp.R:21:3): localSupp sdcMicroObj ────────────────────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_localSupp.R:21:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_localSuppression.R:3:3): localSuppression for objects of class sdcMicro, no stratification ──
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_localSuppression.R:3:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_localSuppression.R:14:3): localSuppression for objects of class sdcMicro, with stratification ──
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_localSuppression.R:14:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_localSuppression.R:26:3): localSuppression for k-anonymity for subsets of key-variables without stratification ──
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_localSuppression.R:26:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_localSuppression.R:42:3): localSuppression for k-anonymity for subsets of key-variables with stratification ──
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_localSuppression.R:42:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_microaggregation.R:21:3): microaggregation ──────────────────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_microaggregation.R:21:2
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_riskyCells.R:23:1): (code run outside of `test_that()`) ─────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_riskyCells.R:23:0
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_topBotCoding.R:64:1): (code run outside of `test_that()`) ───────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
      █
   1. └─sdcMicro::createSdcObj(...) test_topBotCoding.R:64:0
   2.   └─sdcMicro::dRisk(obj)
   3.     ├─sdcMicro:::dRiskX(obj, ...)
   4.     └─sdcMicro:::dRiskX(obj, ...)
   5.       └─sdcMicro:::dRiskWORK(x = x, xm = xm, ...)
   6.         └─base::apply(xm, 2, sd, na.rm = TRUE)
   7.           └─stats:::FUN(newX[, i], ...)
   8.             └─stats::var(...)
   9.               └─base::stopifnot(is.atomic(x))
  ── Error (test_valTable.R:4:3): valTable data.frame ────────────────────────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
       █
    1. └─sdcMicro::valTable(...) test_valTable.R:4:2
    2.   ├─base::as.data.frame(summary.micro(m[[i]])[keep])
    3.   └─sdcMicro:::summary.micro(m[[i]])
    4.     └─sdcMicro::dRisk(x1, x2)
    5.       ├─sdcMicro:::dRiskX(obj, ...)
    6.       └─sdcMicro:::dRiskX(obj, ...)
    7.         └─sdcMicro:::dRiskWORK(x = obj, ...)
    8.           └─base::apply(xm, 2, sd, na.rm = TRUE)
    9.             └─stats:::FUN(newX[, i], ...)
   10.               └─stats::var(...)
   11.                 └─base::stopifnot(is.atomic(x))
  ── Error (test_valTable.R:13:3): valtable more methods ─────────────────────────
  Error in `var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)`: is.atomic(x) is not TRUE
  Backtrace:
       █
    1. ├─testthat::expect_warning(...) test_valTable.R:13:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sdcMicro::valTable(...)
    7.   ├─base::as.data.frame(summary.micro(m[[i]])[keep])
    8.   └─sdcMicro:::summary.micro(m[[i]])
    9.     └─sdcMicro::dRisk(x1, x2)
   10.       ├─sdcMicro:::dRiskX(obj, ...)
   11.       └─sdcMicro:::dRiskX(obj, ...)
   12.         └─sdcMicro:::dRiskWORK(x = obj, ...)
   13.           └─base::apply(xm, 2, sd, na.rm = TRUE)
   14.             └─stats:::FUN(newX[, i], ...)
   15.               └─stats::var(...)
   16.                 └─base::stopifnot(is.atomic(x))
  
  [ FAIL 15 | WARN 0 | SKIP 0 | PASS 289 ]
  Error: Test failures
  Execution halted