Running 'testthat.R' [17s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(groupdata2)
  > 
  > test_check("groupdata2")
  -- 1. Failure: all size settings work in balance() (@test_balance.R#18)  -------
  df_3$trial not equal to c(1, 2, 1, 1, 1, 1, 1, 2, 4).
  3/9 mismatches (average diff: 2)
  [7] 4 - 1 ==  3
  [8] 1 - 2 == -1
  [9] 2 - 4 == -2
  
  -- 2. Failure: all size settings work in balance() (@test_balance.R#37)  -------
  df_max$trial not equal to c(1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4).
  1/12 mismatches
  [4] 2 - 1 == 1
  
  -- 3. Failure: .folds is correct in fold() (@test_fold.R#137)  -----------------
  group_counts(...) not equal to c(6, 6, 5).
  2/3 mismatches (average diff: 1)
  [2] 5 - 6 == -1
  [3] 6 - 5 ==  1
  
  -- 4. Failure: values are decently balanced in num_col in fold() (@test_fold.R#1
  aggregated_scores$group_sums not equal to c(267, 273, 277).
  3/3 mismatches (average diff: 12)
  [1] 285 - 267 == 18
  [2] 264 - 273 == -9
  [3] 268 - 277 == -9
  
  -- 5. Failure: values are decently balanced in num_col in fold() (@test_fold.R#2
  aggregated_scores$group_sums not equal to c(234, 207, 189, 187).
  4/4 mismatches (average diff: 13.5)
  [1] 207 - 234 == -27
  [2] 225 - 207 ==  18
  [3] 196 - 189 ==   7
  [4] 189 - 187 ==   2
  
  -- 6. Failure: values are decently balanced in num_col in fold() (@test_fold.R#2
  aggregated_scores$group_sums not equal to c(283, 246, 288).
  2/3 mismatches (average diff: 5)
  [1] 288 - 283 ==  5
  [3] 283 - 288 == -5
  
  -- 7. Failure: values are decently balanced in num_col in fold() (@test_fold.R#2
  aggregated_scores$group_sums not equal to c(246, 288, 141, 142).
  4/4 mismatches (average diff: 25)
  [1] 283 - 246 ==  37
  [2] 246 - 288 == -42
  [3] 133 - 141 ==  -8
  [4] 155 - 142 ==  13
  
  -- 8. Failure: values are decently balanced in num_col in fold() (@test_fold.R#2
  aggregated_scores$group_sums not equal to c(286, 246, 285).
  3/3 mismatches (average diff: 26)
  [1] 268 - 286 == -18
  [2] 285 - 246 ==  39
  [3] 264 - 285 == -21
  
  -- 9. Failure: values are decently balanced in num_col in fold() (@test_fold.R#2
  aggregated_scores$group_sums not equal to c(222, 189, 188, 218).
  4/4 mismatches (average diff: 12)
  [1] 207 - 222 == -15
  [2] 202 - 189 ==  13
  [3] 199 - 188 ==  11
  [4] 209 - 218 ==  -9
  
  -- 10. Failure: numerically_balanced_group_factor_() work with n=2 (@test_numeri
  `vbf` not equal to factor(c(2, 1, 1, 2, 1, 2)).
  6 string mismatches
  
  -- 11. Failure: numerically_balanced_group_factor_() work with n=2 (@test_numeri
  group_sums$group_sum not equal to c(312, 240).
  2/2 mismatches (average diff: 72)
  [1] 240 - 312 == -72
  [2] 312 - 240 ==  72
  
  -- 12. Failure: numerically_balanced_group_factor_() works with n=3 (@test_numer
  numerically_balanced_group_factor_(df, 3, num_col = "score") not equal to factor(c(2, 3, 3, 2, 1, 3, 1)).
  4 string mismatches
  
  -- 13. Failure: numerically_balanced_group_factor_() works with n=3 (@test_numer
  group_sums$group_sum not equal to c(101, 102, 83).
  3/3 mismatches (average diff: 42.3)
  [1] 144 - 101 == 43
  [2] 143 - 102 == 41
  [3] 126 -  83 == 43
  
  -- 14. Failure: numerically_balanced_group_factor_() works with n=3 (@test_numer
  numerically_balanced_group_factor_(df, 3, num_col = "score") not equal to factor(c(2, 3, 1, 2, 1, 3)).
  4 string mismatches
  
  -- 15. Failure: numerically_balanced_group_factor_() works with n=3 (@test_numer
  group_sums$group_sum not equal to c(88, 102, 82).
  3/3 mismatches (average diff: 20)
  [1] 109 -  88 == 21
  [2]  94 - 102 == -8
  [3] 113 -  82 == 31
  
  -- 16. Failure: numerically_balanced_group_factor_() work method='l_sizes' (@tes
  `vbf` not equal to factor(c(1, 2, 1, 1, 2, 2)).
  2 string mismatches
  
  -- 17. Failure: numerically_balanced_group_factor_() work method='l_sizes' (@tes
  group_sums$group_sum not equal to c(288, 264).
  2/2 mismatches (average diff: 6)
  [1] 294 - 288 ==  6
  [2] 258 - 264 == -6
  
  -- 18. Failure: numerically_balanced_group_factor_() work method='l_sizes' (@tes
  `vbf` not equal to factor(c(2, 2, 2, 1, 2, 2)).
  2 string mismatches
  
  -- 19. Failure: numerically_balanced_group_factor_() work method='l_sizes' (@tes
  group_sums$group_sum not equal to c(69, 483).
  2/2 mismatches (average diff: 16)
  [1]  85 -  69 ==  16
  [2] 467 - 483 == -16
  
  -- 20. Failure: numerically_balanced_group_factor_() on large datasets (@test_nu
  group_sums$group_sum not equal to c(100, 100, 99.8, 99.9, 99.9).
  5/5 mismatches (average diff: 0.1)
  [1] 100.0 - 100.0 ==  0.0236
  [2] 100.0 - 100.0 == -0.0121
  [3]  99.9 -  99.8 ==  0.1377
  [4]  99.7 -  99.9 == -0.1920
  [5] 100.0 -  99.9 ==  0.1345
  
  -- 21. Failure: .partitions is correct in partition() with list_out == FALSE (@t
  group_counts(df_unequal, 0.4, num_col = "score", id_col = "participant") not equal to c(5, 12).
  2/2 mismatches (average diff: 1)
  [1]  6 -  5 ==  1
  [2] 11 - 12 == -1
  
  -- 22. Failure: .partitions is correct in partition() with list_out == FALSE (@t
  group_counts(...) not equal to c(5, 12).
  2/2 mismatches (average diff: 1)
  [1]  6 -  5 ==  1
  [2] 11 - 12 == -1
  
  -- 23. Failure: .partitions is correct in partition() with list_out == FALSE (@t
  group_counts(df_unequal, 2, cat_col = "diagnosis", id_col = "participant") not equal to c(12, 5).
  2/2 mismatches (average diff: 1)
  [1] 11 - 12 == -1
  [2]  6 -  5 ==  1
  
  -- 24. Failure: .partitions is correct in partition() with list_out == FALSE (@t
  group_counts(df_unequal, 2, id_col = "participant", num_col = "score") not equal to c(5, 12).
  2/2 mismatches (average diff: 1)
  [1]  6 -  5 ==  1
  [2] 11 - 12 == -1
  
  -- 25. Failure: .partitions is correct in partition() with list_out == FALSE (@t
  group_counts(...) not equal to c(5, 12).
  2/2 mismatches (average diff: 1)
  [1]  6 -  5 ==  1
  [2] 11 - 12 == -1
  
  -- 26. Failure: balance() works with method distributed (@test_sampling_methods.
  counts$n not equal to c(3, 2, 2, 3).
  2/4 mismatches (average diff: 1)
  [1] 2 - 3 == -1
  [2] 3 - 2 ==  1
  
  -- 27. Failure: balance() works with method distributed (@test_sampling_methods.
  counts$n not equal to c(3, 2, 2, 3).
  2/4 mismatches (average diff: 1)
  [1] 2 - 3 == -1
  [2] 3 - 2 ==  1
  
  == testthat results  ===========================================================
  OK: 548 SKIPPED: 3 WARNINGS: 0 FAILED: 27
  1. Failure: all size settings work in balance() (@test_balance.R#18) 
  2. Failure: all size settings work in balance() (@test_balance.R#37) 
  3. Failure: .folds is correct in fold() (@test_fold.R#137) 
  4. Failure: values are decently balanced in num_col in fold() (@test_fold.R#199) 
  5. Failure: values are decently balanced in num_col in fold() (@test_fold.R#207) 
  6. Failure: values are decently balanced in num_col in fold() (@test_fold.R#231) 
  7. Failure: values are decently balanced in num_col in fold() (@test_fold.R#239) 
  8. Failure: values are decently balanced in num_col in fold() (@test_fold.R#250) 
  9. Failure: values are decently balanced in num_col in fold() (@test_fold.R#258) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted