Running 'testthat.R' [66s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(collapse)
  collapse 1.3.0, see ?`collapse-package` or ?`collapse-documentation`
  Note: stats::D  ->  D.expression, D.call
  
  Attaching package: 'collapse'
  
  The following object is masked from 'package:stats':
  
      D
  
  > 
  > test_check("collapse")
  -- 1. Failure: fnth performs like nth (defined above) (@test-fmedian.R#478)  ---
  fnth(m, n) not equal to dapply(m, nth, n, na.rm = TRUE).
  4/11 mismatches (average diff: 3.7)
  [3] 71.10 - 75.70 ==  -4.600
  [4] 52.00 - 62.00 == -10.000
  [6]  1.51 -  1.61 ==  -0.102
  [7] 14.50 - 14.60 ==  -0.100
  
  -- 2. Failure: fnth performs like nth (defined above) (@test-fmedian.R#479)  ---
  fnth(m, n, na.rm = FALSE) not equal to dapply(m, nth, n).
  4/11 mismatches (average diff: 3.7)
  [3] 71.10 - 75.70 ==  -4.600
  [4] 52.00 - 62.00 == -10.000
  [6]  1.51 -  1.61 ==  -0.102
  [7] 14.50 - 14.60 ==  -0.100
  
  -- 3. Failure: fnth performs like nth (defined above) (@test-fmedian.R#482)  ---
  fnth(mtcars, n) not equal to dapply(mtcars, nth, n, na.rm = TRUE).
  4/11 mismatches (average diff: 3.7)
  [3] 71.10 - 75.70 ==  -4.600
  [4] 52.00 - 62.00 == -10.000
  [6]  1.51 -  1.61 ==  -0.102
  [7] 14.50 - 14.60 ==  -0.100
  
  -- 4. Failure: fnth performs like nth (defined above) (@test-fmedian.R#483)  ---
  fnth(mtcars, n, na.rm = FALSE) not equal to dapply(mtcars, nth, n).
  4/11 mismatches (average diff: 3.7)
  [3] 71.10 - 75.70 ==  -4.600
  [4] 52.00 - 62.00 == -10.000
  [6]  1.51 -  1.61 ==  -0.102
  [7] 14.50 - 14.60 ==  -0.100
  
  -- 5. Failure: fnth performs like nth (defined above) (@test-fmedian.R#487)  ---
  fnth(x, n, f2) not equal to BY(x, f2, nth, n, na.rm = TRUE).
  10/10 mismatches (average diff: 1.03)
  [1] -2.47 - -0.861 == -1.606
  [2] -2.01 - -1.089 == -0.918
  [3] -2.04 - -1.391 == -0.647
  [4] -1.07 - -0.661 == -0.408
  [5] -3.40 -  0.246 == -3.645
  [6] -1.35 - -0.945 == -0.410
  [7] -1.44 - -1.236 == -0.206
  [8] -1.26 - -0.208 == -1.050
  [9] -1.33 - -0.839 == -0.492
  ...
  
  -- 6. Failure: fnth performs like nth (defined above) (@test-fmedian.R#488)  ---
  fnth(x, n, f2, na.rm = FALSE) not equal to BY(x, f2, nth, n).
  10/10 mismatches (average diff: 1.03)
  [1] -2.47 - -0.861 == -1.606
  [2] -2.01 - -1.089 == -0.918
  [3] -2.04 - -1.391 == -0.647
  [4] -1.07 - -0.661 == -0.408
  [5] -3.40 -  0.246 == -3.645
  [6] -1.35 - -0.945 == -0.410
  [7] -1.44 - -1.236 == -0.206
  [8] -1.26 - -0.208 == -1.050
  [9] -1.33 - -0.839 == -0.492
  ...
  
  -- 7. Failure: fnth performs like nth (defined above) (@test-fmedian.R#490)  ---
  fnth(m, n, g2) not equal to BY(m, g2, nth, n, na.rm = TRUE).
  12/22 mismatches (average diff: 6.79)
  [1]  10.40 -  14.30 ==  -3.90
  [2]  10.40 -  13.30 ==  -2.90
  [5]  71.10 -  75.70 ==  -4.60
  [6]  95.10 - 120.10 == -25.00
  [7]  52.00 -  65.00 == -13.00
  [8]  62.00 -  91.00 == -29.00
  [9]   2.76 -   3.00 ==  -0.24
  [10]  2.76 -   2.93 ==  -0.17
  [11]  1.61 -   1.83 ==  -0.22
  ...
  
  -- 8. Failure: fnth performs like nth (defined above) (@test-fmedian.R#491)  ---
  fnth(m, n, g2, na.rm = FALSE) not equal to BY(m, g2, nth, n).
  12/22 mismatches (average diff: 6.79)
  [1]  10.40 -  14.30 ==  -3.90
  [2]  10.40 -  13.30 ==  -2.90
  [5]  71.10 -  75.70 ==  -4.60
  [6]  95.10 - 120.10 == -25.00
  [7]  52.00 -  65.00 == -13.00
  [8]  62.00 -  91.00 == -29.00
  [9]   2.76 -   3.00 ==  -0.24
  [10]  2.76 -   2.93 ==  -0.17
  [11]  1.61 -   1.83 ==  -0.22
  ...
  
  -- 9. Failure: fnth performs like nth (defined above) (@test-fmedian.R#492)  ---
  fnth(mtcars, n, g2) not equal to BY(mtcars, g2, nth, n, na.rm = TRUE).
  Component "mpg": Mean relative difference: 0.3269231
  Component "disp": Mean relative difference: 0.1780987
  Component "hp": Mean relative difference: 0.3684211
  Component "drat": Mean relative difference: 0.07427536
  Component "wt": Mean relative difference: 0.2707801
  Component "qsec": Mean relative difference: 0.06219931
  
  -- 10. Failure: fnth performs like nth (defined above) (@test-fmedian.R#493)  --
  fnth(mtcars, n, g2, na.rm = FALSE) not equal to BY(mtcars, g2, nth, n).
  Component "mpg": Mean relative difference: 0.3269231
  Component "disp": Mean relative difference: 0.1780987
  Component "hp": Mean relative difference: 0.3684211
  Component "drat": Mean relative difference: 0.07427536
  Component "wt": Mean relative difference: 0.2707801
  Component "qsec": Mean relative difference: 0.06219931
  
  -- 11. Failure: fmode performs like fmode with weights all equal (@test-fmode.R#
  fmode(x, na.rm = FALSE, ties = t) not equal to fmode(x, w = rep(1.44565, 100), na.rm = FALSE, ties = t).
  1/1 mismatches
  [1] 2 - 3 == -1
  
  -- 12. Failure: fmode performs like fmode with weights all equal (@test-fmode.R#
  fmode(x, f, na.rm = FALSE, ties = t) not equal to fmode(x, f, rep(5.88, 100), na.rm = FALSE, ties = t).
  1/10 mismatches
  [9] 8 - 7 == 1
  
  -- 13. Failure: fmode performs like fmode with weights all equal (@test-fmode.R#
  fmode(m, g, na.rm = FALSE, ties = t) not equal to fmode(m, g, rep(1e-04, l), na.rm = FALSE, ties = t).
  5/30 mismatches (average diff: 20)
  [6]  2000 - 1980 == 20
  [7]  2000 - 1980 == 20
  [8]  2000 - 1980 == 20
  [9]  2000 - 1980 == 20
  [10] 2000 - 1980 == 20
  
  -- 14. Failure: fmode performs like fmode with weights all equal (@test-fmode.R#
  fmode(mNA, g, na.rm = FALSE, ties = t) not equal to fmode(mNA, g, rep(5.7, l), na.rm = FALSE, ties = t).
  1/30 mismatches
  [10] 2000 - 1980 == 20
  
  -- 15. Failure: fmode performs like fmode with weights all equal (@test-fmode.R#
  fmode(dataNA, g, na.rm = FALSE, ties = t) not equal to fmode(dataNA, g, rep(0.9, l), na.rm = FALSE, ties = t).
  Component "decade": Mean relative difference: 0.01
  
  -- 16. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(m, g, stable.algo = FALSE) not equal to BY(m, g, var, na.rm = TRUE).
  4/77 mismatches (average diff: NaN)
  [15]  Inf - NA == NA
  [29] -Inf - NA == NA
  [36] -Inf - NA == NA
  [43]  Inf - NA == NA
  
  -- 17. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(m, g, na.rm = FALSE, stable.algo = FALSE) not equal to BY(m, g, var).
  4/77 mismatches (average diff: NaN)
  [15]  Inf - NA == NA
  [29] -Inf - NA == NA
  [36] -Inf - NA == NA
  [43]  Inf - NA == NA
  
  -- 18. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mNA, g, na.rm = FALSE, stable.algo = FALSE) not equal to BY(mNA, g, var).
  3/77 mismatches (average diff: NaN)
  [15]  Inf - NA == NA
  [36] -Inf - NA == NA
  [43]  Inf - NA == NA
  
  -- 19. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mNA, g, stable.algo = FALSE) not equal to BY(mNA, g, var, na.rm = TRUE).
  4/77 mismatches (average diff: NaN)
  [7]  -Inf - NA == NA
  [15]  Inf - NA == NA
  [36] -Inf - NA == NA
  [43]  Inf - NA == NA
  
  -- 20. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mtcars, g, stable.algo = FALSE) not equal to BY(mtcars, g, var, na.rm = TRUE).
  Component "disp": 'is.NA' value mismatch: 1 in current 0 in target
  Component "drat": 'is.NA' value mismatch: 1 in current 0 in target
  Component "wt": 'is.NA' value mismatch: 1 in current 0 in target
  Component "qsec": 'is.NA' value mismatch: 1 in current 0 in target
  
  -- 21. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mtcars, g, na.rm = FALSE, stable.algo = FALSE) not equal to BY(mtcars, g, var).
  Component "disp": 'is.NA' value mismatch: 1 in current 0 in target
  Component "drat": 'is.NA' value mismatch: 1 in current 0 in target
  Component "wt": 'is.NA' value mismatch: 1 in current 0 in target
  Component "qsec": 'is.NA' value mismatch: 1 in current 0 in target
  
  -- 22. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mtcNA, g, na.rm = FALSE, stable.algo = FALSE) not equal to BY(mtcNA, g, var).
  Component "disp": 'is.NA' value mismatch: 4 in current 3 in target
  Component "wt": 'is.NA' value mismatch: 4 in current 3 in target
  Component "qsec": 'is.NA' value mismatch: 4 in current 3 in target
  
  -- 23. Failure: fvar with direct algorithm performs like base::var (@test-fvar-f
  fvar(mtcNA, g, stable.algo = FALSE) not equal to BY(mtcNA, g, var, na.rm = TRUE).
  Component "mpg": 'is.NA' value mismatch: 2 in current 1 in target
  Component "disp": 'is.NA' value mismatch: 2 in current 1 in target
  Component "wt": 'is.NA' value mismatch: 1 in current 0 in target
  Component "qsec": 'is.NA' value mismatch: 1 in current 0 in target
  
  == testthat results  ===========================================================
  [ OK: 7739 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 23 ]
  1. Failure: fnth performs like nth (defined above) (@test-fmedian.R#478) 
  2. Failure: fnth performs like nth (defined above) (@test-fmedian.R#479) 
  3. Failure: fnth performs like nth (defined above) (@test-fmedian.R#482) 
  4. Failure: fnth performs like nth (defined above) (@test-fmedian.R#483) 
  5. Failure: fnth performs like nth (defined above) (@test-fmedian.R#487) 
  6. Failure: fnth performs like nth (defined above) (@test-fmedian.R#488) 
  7. Failure: fnth performs like nth (defined above) (@test-fmedian.R#490) 
  8. Failure: fnth performs like nth (defined above) (@test-fmedian.R#491) 
  9. Failure: fnth performs like nth (defined above) (@test-fmedian.R#492) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted