Running 'testthat.R' [33s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(sourceR)
  Loading required package: dplyr
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Loading required package: tensorA
  
  Attaching package: 'tensorA'
  
  The following object is masked from 'package:base':
  
      norm
  
  Loading required package: assertthat
  > 
  > test_check("sourceR")
  -- 1. Error: Test X (@testData.R#5)  -------------------------------------------
  Source data must have a single observation for each source/type/time combination.
  1: X(src, x = "Count", source = "Source", type = "Type", time = "Time") at testthat/testData.R:5
  2: X_$new(data, x, type, source, time) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:124
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$pack(data, ...) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:9
  5: tryCatch(reshape2::acast(data, type ~ source ~ time, value.var = "x", drop = F), 
         condition = function(c) stop("Source data must have a single observation for each source/type/time combination.")) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:93
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  9: stop("Source data must have a single observation for each source/type/time combination.") at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:95
  
  -- 2. Error: Prevalence (@testData.R#10)  --------------------------------------
  Prevalence must have one value per source/time
  1: expect_silent(Prev(sim_SA$prev, prev = "Value", source = "Source", time = "Time")) at testthat/testData.R:10
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: Prev(sim_SA$prev, prev = "Value", source = "Source", time = "Time")
  10: Prev_$new(data, prev, source, time) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:171
  11: .subset2(public_bind_env, "initialize")(...)
  12: private$pack(data, ...) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:9
  13: tryCatch(reshape2::acast(data, source ~ time, value.var = "prev", drop = F), condition = function(c) stop("Prevalence must have one value per source/time")) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:142
  14: tryCatchList(expr, classes, parentenv, handlers)
  15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  16: value[[3L]](cond)
  17: stop("Prevalence must have one value per source/time") at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:144
  
  -- 3. Error: Detect y/X data mismatch (@testHaldDPTimeLoc.R#29)  ---------------
  Case data must have single observation for each type/time/location combination
  1: Y(data = dat$y, y = "Human", type = "Type", time = "Time", location = "Location") at testthat/testHaldDPTimeLoc.R:29
  2: Y_$new(data, y, type, time, location) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:75
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$pack(data, ...) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:9
  5: tryCatch(reshape2::acast(data, type ~ time ~ location, value.var = "y", drop = F), 
         condition = function(c) stop("Case data must have single observation for each type/time/location combination")) at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:46
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  9: stop("Case data must have single observation for each type/time/location combination") at D:/temp/RtmpkT7dw9/R.INSTALL16a04b432902/sourceR/R/data.R:48
  
  == testthat results  ===========================================================
  OK: 11 SKIPPED: 3 FAILED: 3
  1. Error: Test X (@testData.R#5) 
  2. Error: Prevalence (@testData.R#10) 
  3. Error: Detect y/X data mismatch (@testHaldDPTimeLoc.R#29) 
  
  Error: testthat unit tests failed
  Execution halted