Running ‘runUnitTests.R’ [1s/1s]
Running the tests in ‘tests/runUnitTests.R’ failed.
Complete output:
  > ## Run unit tests
  > ## Charlie Redmon
  > ## 20170802
  > 
  > if (!require("RUnit", quietly = TRUE)) {
  +   warning("Cannot run unit tests. Package RUnit is not available.")
  +   q('no')
  + }
  > 
  > library(kutils)
  > 
  > path <- system.file(package="kutils", "unitTests")
  > stopifnot(file.exists(path), file.info(path.expand(path))$isdir)
  > 
  > testsuite.variableKey <- defineTestSuite("VariableKey",
  +                                          dirs=path,
  +                                          testFileRegexp="^runit.+\\.R",
  +                                          testFuncRegexp="^test.+",
  +                                          rngKind="Marsaglia-Multicarry",
  +                                          rngNormalKind="Kinderman-Ramage")
  > 
  > testResult <- runTestSuite(testsuite.variableKey)
  
  
  Executing test function test.assignMissing  ...  done successfully.
  
  
  
  Executing test function test.assignRecode  ...  done successfully.
  
  
  
  Executing test function test.keyApply  ... keyImport guessed that is a wide format key.
  Timing stopped at: 0.272 0.008 0.283
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.keyImport  ... keyImport guessed that is a wide format key.
  Timing stopped at: 0.026 0 0.027
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.keyRead  ...  done successfully.
  
  
  
  Executing test function test.keyTemplate  ... Timing stopped at: 0.017 0.008 0.029
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.keyUpdate  ... keyDiff: 4 rows in key2 are not in key1
  Timing stopped at: 0.043 0.001 0.044
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.keysPool  ... Timing stopped at: 0.019 0 0.019
  Error in `[<-.data.frame`(`*tmp*`, keyblock[, col] %in% classes[-length(classes)],  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.long2wide  ... Timing stopped at: 0.002 0 0.002
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
   done successfully.
  
  
  
  Executing test function test.safeInteger  ...  done successfully.
  
  
  
  Executing test function test.wide2long  ... keyImport guessed that is a wide format key.
  Timing stopped at: 0.025 0 0.024
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
   done successfully.
  
  > printTextProtocol(testResult, showDetails=TRUE)
  RUNIT TEST PROTOCOL -- Sun Oct 21 21:43:55 2018 
  *********************************************** 
  Number of test functions: 11 
  Number of errors: 7 
  Number of failures: 0 
  
   
  1 Test Suite : 
  VariableKey - 11 test functions, 7 errors, 0 failures
  ERROR in test.keyApply: Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  ERROR in test.keyImport: Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  ERROR in test.keyTemplate: Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  ERROR in test.keyUpdate: Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  ERROR in test.keysPool: Error in `[<-.data.frame`(`*tmp*`, keyblock[, col] %in% classes[-length(classes)],  : 
    replacement has 1 row, data has 0
  ERROR in test.long2wide: Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  ERROR in test.wide2long: Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  
  
  
  Details 
  *************************** 
  Test Suite: VariableKey 
  Test function regexp: ^test.+ 
  Test file regexp: ^runit.+\.R 
  Involved directory: 
  /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/kutils/unitTests 
  --------------------------- 
  Test file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/kutils/unitTests/runit.VariableKey.R 
  test.assignMissing: (16 checks) ... OK (0.01 seconds)
  test.assignRecode: (3 checks) ... OK (0 seconds)
  test.keyApply: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  test.keyImport: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  test.keyRead: (1 checks) ... OK (0.03 seconds)
  test.keyTemplate: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  test.keyUpdate: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  test.keysPool: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, keyblock[, col] %in% classes[-length(classes)],  : 
    replacement has 1 row, data has 0
  test.long2wide: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, is.na(keylong[, "value_new"]), "value_new",  : 
    replacement has 1 row, data has 0
  test.safeInteger: (2 checks) ... OK (0 seconds)
  test.wide2long: ERROR !! 
  Error in `[<-.data.frame`(`*tmp*`, key$class_new == "logical" & !is.na(key$value_new) &  : 
    replacement has 1 row, data has 0
  > 
  > tmp <- getErrors(testResult)
  > if (tmp$nFail > 0 | tmp$nErr > 0) {
  +   stop(paste0("\n\nUnit testing failed (", tmp$nFail, " test failures), ",
  +               tmp$nErr, " R errors)\n\n"))
  + }
  Error: 
  
  Unit testing failed (0 test failures), 7 R errors)
  
  Execution halted