Running 'testthat.R' [82s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(mosaic)
  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: lattice
  Loading required package: ggformula
  Loading required package: ggplot2
  Loading required package: ggstance
  
  Attaching package: 'ggstance'
  
  The following objects are masked from 'package:ggplot2':
  
      GeomErrorbarh, geom_errorbarh
  
  
  New to ggformula?  Try the tutorials: 
  	learnr::run_tutorial("introduction", package = "ggformula")
  	learnr::run_tutorial("refining", package = "ggformula")
  Loading required package: mosaicData
  Loading required package: Matrix
  
  The 'mosaic' package masks several functions from core packages in order to add 
  additional features.  The original behavior of these functions should not be affected by this.
  
  Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.
  
  Have you tried the ggformula package for your plots?
  
  Attaching package: 'mosaic'
  
  The following object is masked from 'package:Matrix':
  
      mean
  
  The following object is masked from 'package:ggplot2':
  
      stat
  
  The following objects are masked from 'package:dplyr':
  
      count, do, tally
  
  The following objects are masked from 'package:stats':
  
      IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
      quantile, sd, t.test, var
  
  The following objects are masked from 'package:base':
  
      max, mean, min, prod, range, sample, sum
  
  > 
  > test_check("mosaic")
  -- 1. Failure: resample works (@test-resample.R#73)  ---------------------------
  `testcase1` not equivalent to resample(0:1, 100).
  52/100 mismatches (average diff: 1)
  [3]  1 - 0 ==  1
  [10] 1 - 0 ==  1
  [12] 0 - 1 == -1
  [15] 0 - 1 == -1
  [17] 1 - 0 ==  1
  [19] 0 - 1 == -1
  [20] 0 - 1 == -1
  [22] 0 - 1 == -1
  [24] 0 - 1 == -1
  ...
  
  -- 2. Failure: resample works (@test-resample.R#77)  ---------------------------
  `testcase2` not equivalent to resample(Small).
  Component "name": 10 string mismatches
  Component "birthmonth": Mean relative difference: 0.2142857
  Component "birthyear": Mean relative difference: 0.01149425
  Component "length": Mean relative difference: 0.06244761
  Component "width": Mean relative difference: 0.07544757
  Component "sex": 4 string mismatches
  Component "biggerfoot": 4 string mismatches
  Component "domhand": 5 string mismatches
  Component "orig.id": 8 string mismatches
  
  -- 3. Failure: resample works (@test-resample.R#87)  ---------------------------
  `testcase4` not equivalent to resample(Small, groups = sex, shuffled = c("id1", "id2")).
  Component "name": 10 string mismatches
  Component "birthmonth": Mean relative difference: 0.754386
  Component "birthyear": Mean relative difference: 0.01149425
  Component "length": Mean relative difference: 0.05462012
  Component "width": Mean relative difference: 0.07612457
  Component "biggerfoot": 4 string mismatches
  Component "domhand": 3 string mismatches
  Component "orig.id": 10 string mismatches
  Component "id1": 8 string mismatches
  ...
  
  
  Null distribution appears to be asymmetric. (p = 8.76e-30) 
  
  Test statistic applied to sample data =  18 
  
  Quantiles of test statistic applied to random data: 
  50% 90% 95% 99% 
   16  19  20  22  
  
  Of the  1000  samples (1 original +  999  random), 
  	 131 ( 13.1 % ) had test stats = 18 
  	 297 ( 29.7 % ) had test stats >= 18 
  
  Null distribution appears to be asymmetric. (p = 2.28e-06) 
  
  Test statistic applied to sample data =  18 
  
  Quantiles of test statistic applied to random data: 
       50%      90%      95%      99% 
  10.00000 26.00000 31.33333 48.69333  
  
  Of the  1000  samples (1 original +  999  random), 
  	 33 ( 3.3 % ) had test stats = 18 
  	 240 ( 24 % ) had test stats >= 18 
  
  Null distribution appears to be asymmetric. (p = 8.76e-30) 
  
  Test statistic applied to sample data =  18 
  
  Quantiles of test statistic applied to random data: 
  50% 90% 95% 99% 
   16  19  20  22  
  
  Of the  1000  samples (1 original +  999  random), 
  	 131 ( 13.1 % ) had test stats = 18 
  	 297 ( 29.7 % ) had test stats >= 18 
  [1] 0.9331928
  [1] 567.449
  == testthat results  ===========================================================
  [ OK: 283 | SKIPPED: 72 | WARNINGS: 6 | FAILED: 3 ]
  1. Failure: resample works (@test-resample.R#73) 
  2. Failure: resample works (@test-resample.R#77) 
  3. Failure: resample works (@test-resample.R#87) 
  
  Error: testthat unit tests failed
  Execution halted