Running ‘testthat.R’ [18s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(atable)
  > 
  > test_check("atable")
  [1] "name clash in aliases:"
          old                  new
  1   alias_1 !alias! name [clash]
  2   alias_2 !alias! name [clash]
  3   alias__                alias
  4 alias____                alias
  [1] "name clash in aliases:"
        old                  new
  1 alias_1 !alias! name [clash]
  2 alias_2 !alias! name [clash]
  [1] "name clash in aliases:"
          old   new
  1   alias__ alias
  2 alias____ alias
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  atable
   --- call from context --- 
  two_sample_htest.numeric(value, group, ...)
   --- call from argument --- 
  if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }
   --- R stacktrace ---
  where 1: two_sample_htest.numeric(value, group, ...)
  where 2: two_sample_htest(value, group, ...)
  where 3: (function (DD, group_col, value_col, ...) 
  {
      stopifnot(is.character(group_col), length(group_col) == 1, 
          is.character(value_col), length(value_col) == 1, group_col %in% 
              colnames(DD), value_col %in% colnames(DD), is.factor(DD[[group_col]]))
      value <- DD[[value_col]]
      group <- DD[[group_col]]
      group_levels <- levels(DD[[group_col]])
      result <- if (length(group_levels) == 2) {
          two_sample_htest(value, group, ...)
      }
      else {
          multi_sample_htest(value, group, ...)
      }
      return(result)
  })(value_col = dots[[1L]][[2L]], DD = list(Logical = c(TRUE, 
  TRUE, FALSE, FALSE, FALSE, NA, NA, NA, TRUE, TRUE, NA, TRUE, 
  FALSE, FALSE, NA, TRUE, FALSE, FALSE, NA, FALSE, TRUE, FALSE, 
  TRUE, FALSE, NA), Numeric = c(-1.01759611982611, -0.383283959886278, 
  0.969545013970117, -0.0539967368261657, -0.190816474104282, 0.431565372868771, 
  NA, -1.66262940218559, -2.11320011492914, 0.273695272430415, 
  0.446041052961866, NA, 0.482369466104533, -0.630731953970819, 
  0.586807720012995, -0.484595416218709, -0.825327957109945, NA, 
  -0.832552825764212, 0.732528486768414, -0.336311209009573, NA, 
  1.62844226581541, 0.485941110403099, -0.195656817284544), Factor = c(3L, 
  NA, 4L, 3L, 4L, 3L, 1L, 2L, 2L, 4L, 1L, 4L, 2L, 4L, 3L, 4L, 1L, 
  2L, 2L, 4L, 1L, 3L, 3L, 3L, 3L), Ordered = c(3L, 3L, NA, 1L, 
  1L, 2L, 2L, 3L, 3L, 1L, 2L, 2L, 1L, 2L, 3L, 3L, 1L, 3L, 3L, 2L, 
  NA, 1L, 1L, 3L, 2L), Character = c("", "b", "", "", "", "b", 
  "", NA, "", "", "", "a", "a", "a", "b", "", "a", "b", "b", "a", 
  "b", "a", "", "a", ""), Split1 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L), Split2 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), Group = c(2L, 
  2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 
  2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L), Observations = c(0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L)), group_col = "Group")
  where 4: mapply(test_caller, value_col = target_cols, MoreArgs = list(DD = DD, 
      group_col = group_col, ...), SIMPLIFY = FALSE)
  where 5: FUN(X[[i]], ...)
  where 6: lapply(pieces, .fun, ...)
  where 7: structure(lapply(pieces, .fun, ...), dim = dim(pieces))
  where 8: llply(.data = .data, .fun = .fun, ..., .progress = .progress, 
      .inform = .inform, .parallel = .parallel, .paropts = .paropts)
  where 9: plyr::ldply(splitted, apply_tests_helper, target_cols, group_col, 
      ...)
  where 10: apply_tests(DD, target_cols, group_col, split_cols, ...)
  where 11: atable_splitted_grouped(DD = DD, target_cols = target_cols, group_col = group_col, 
      split_cols = split_cols, format_to = format_to, Alias_mapping = Alias_mapping, 
      blocks = blocks, indent_character = indent_character, indent = indent, 
      ...)
  where 12: atable.data.frame(x = list(Split1 = c(1L, 1L, 3L, 1L, 2L, 2L, 
  1L, 3L, 2L, 1L, 2L, 1L, 1L, 3L, 2L, 1L, 1L, 3L, 2L, 2L, 1L, 3L, 
  1L, 1L, 3L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 3L, 1L, 3L, 3L, 
  1L, 2L, 2L, 2L, 3L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 
  3L, 1L, 1L, 3L, 3L, 2L, 1L, 1L, 1L, 2L, 1L, 3L, 3L, 1L, 1L, 3L, 
  3L, 3L, 3L, 2L, 3L, 1L, 3L, 2L, 2L, 3L, 2L, 3L, 2L, 2L, 1L, 2L, 
  3L, 3L, 3L, 3L, 1L, 3L, 3L, 1L, 1L, 1L, 3L, 2L, 1L, 2L, 2L, 3L, 
  3L, 2L, 1L, 1L, 1L, 1L, 2L, 3L, 2L, 1L, 1L, 2L, 2L, 2L, 3L, 2L, 
  2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 3L), Split2 = c(1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 
  1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 
  2L, 1L, 2L, 2L, 2L, 2L, 2L,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1L, 1L, 3L, 
      2L, 1L, 1L, 2L, 3L, 3L, 2L, 1L, 2L, 2L, 3L, 2L, 2L, 2L, 2L, 
      1L, 3L, 1L, 2L, 1L, 1L, 2L, 2L, 3L, 2L, 3L, 1L, 2L, 1L, 3L, 
      2L, 1L, 2L, 2L, 3L, 2L, 2L, 1L, 1L, 3L, 3L, 3L, 2L, 1L, 3L, 
      1L, 1L, 2L, 1L, 1L, 2L, 3L, 2L, 1L, 3L, 3L, 2L, 2L, 2L, 3L, 
      1L, 3L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 1L, 1L, 3L, 2L, 3L, 
      2L, 2L, 1L, 3L, 1L, 1L, 1L, 1L, 1L, 2L, 3L, 1L, 3L, 2L, 1L, 
      3L, 1L, 1L, 3L, 1L, 1L, 2L, 2L), Numeric = c(-1.01759611982611, 
      -0.383283959886278, 0.872755411671399, 0.969545013970117, 
      0.383846665027094, -1.85155566306746, -0.0539967368261657, 
      1.06477321433828, 0.813195037411605, -0.190816474104282, 
      -2.6999298085637, 0.0609666388011166, 0.573751697483578, 
      NA, 0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 
      0.470393399873943, -1.2426702705746, 1.38157545638553, 1.20445893700982, 
      0.824073963681881, -1.66262940218559, -0.569306343605481, 
      0.635513817289526, 0.0437220075778579, 0.348012303661307, 
      2.45959354887041, -0.818380324399669, -2.11320011492914, 
      0.273695272430415, NA, 0.446041052961866, -0.812384723790597, 
      NA, -0.12370597157743, -0.477335506030052, -0.166261491486608, 
      0.862563383626431, 0.0973404852028189, -1.62561673921129, 
      -0.0046207678264578, 0.760242167662055, 0.0389909128725626, 
      0.735072141614441, -0.14647262699887, NA, 0.482369466104533, 
      0.992943636775734, -1.24639549803204, -0.0334875248456097, 
      -0.0709621812499963, -0.758920653730951, -1.03435936093915, 
      -0.630731953970819, 0.586807720012995, -0.416322656183652, 
      -0.78488780950532, 0.163416319486097, -1.23671423510935, 
      1.04587377623667, -0.484595416218709, 0.189128811680665, 
      NA, -0.000240668886441977, 1.80938204244287, -0.825327957109945, 
      1.14547045222799, 0.0315731875532431, -0.83520580530672, 
      -0.0687636490165125, 0.746771687012467, -0.425518734394604, 
      -0.772082235193457, 0.152764106747895, 0.988596845178799, 
      -0.073458334672174, -1.38702655355974, -1.30667590437536, 
      -0.768395325077939, -0.527108125374458, -0.0214270650416246, 
      0.670498070996282, -0.434617038572407, -1.11387978331285, 
      0.6071059948785, 0.275456968739591, NA, -1.68248085947826, 
      NA, 1.35336189394267, 0.724173800683369, -0.832552825764212, 
      0.732528486768414, -0.871926869997213, -0.453397511229793, 
      1.18753427862908, -0.290145311790079, NA, -0.291227708779169, 
      NA, -0.848815696948922, -1.08851986195719, -0.484290571117173, 
      -0.336311209009573, NA, -0.243247228574846, 1.89220204160011, 
      -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
      0.0885218957136163, 1.23915070840056, -1.64455553575371, 
      1.44635652537848, -0.690560171665183, -0.276431085453852, 
      -1.10941875989944, 0.133869316429452, 1.78533905173155, 2.42216335525159, 
      -1.07682890211841, 0.485941110403099, 1.38852173874429, -0.195656817284544, 
      -0.218174797706211, -0.304777954546445), Numeric2 = c(5.79349817233433, 
      8.19228823244728, 6.06285928371989, 4.96056404289091, 3.09439022266822, 
      5.49504605667385, 2.35138924624973, 3.16223048908827, 7.2895403293352, 
      5.32603926453643, 4.72304888207834, 3.23317703393344, 6.79309870445465, 
      8.00473775612642, 1.39218470837367, NA, 4.14720073957576, 
      2.26493281491731, 1.00378403201199, 3.9927016599802, 5.96653564843891, 
      8.43052683692966, NA, 1.89268158006277, 3.06570934596424, 
      -0.989471092002128, 1.74839967462313, 1.66794472245547, 1.83229090042119, 
      -2.56650379744121, 4.64025565085966, 2.10423119123551, 8.56147358149649, 
      6.38786784824525, -0.360588695398398, 4.29518626301752, 2.21868704730054, 
      6.66484350590355, 4.159211246496, 2.32892912246603, 5.31519110851816, 
      4.45782447592726, 3.50614725475131, 10.0596718644279, 2.41184234104822, 
      2.58763908104787, -0.637810772052571, 3.87841983011447, 6.67106891641203, 
      -2.21416355278764, 3.24980463978094, 0.455048720040046, 8.32581179505072, 
      8.07368661663659, 5.00350854202195, 8.28801424120068, 1.39804644736395, 
      6.85195517491566, 2.2449654741003, 4.96287256757689, 3.10181195000527, 
      3.16437075012079, 5.6383454749886, 0.0885365390653829, 3.24725660487262, 
      4.51302212115373, 2.78959756375747, 4.31397832250718, 3.04335763979797, 
      8.85503180765028, NA, 12.8975961094997, 1.61476718632237, 
      6.44309774403974, 10.2940924303911, 4.90294016545771, 0.750774574482307, 
      0.981032494590146, 3.89375630524716, 7.92737308256024, 6.25120145994016, 
      -2.41510498283726, 1.8989376734001, 3.97283057412104, -0.374400461734306, 
      6.08358893948461, -3.38400642555946, 4.42986929212137, 2.82633364261883, 
      2.52650774315777, 3.14905764264385, 4.94438441412353, 5.18897973381697, 
      3.32318886689212, -1.77485129102168, -0.317687894965937, 
      -0.408973321917204, 6.2855903406758, 3.26915505438616, 4.80902982225402, 
      -0.676782562867448, 2.39323597991106, 5.68735591952049, 3.46502162974024, 
      3.65459204139205, 3.7838155836809, 7.63272942077891, 2.15530929760089, 
      6.0283793749441, 6.69579881661266, 0.43204628943694, 4.36377654945703, 
      3.96633494160877, 7.08742215794128, 6.74432460315884, 3.99263119996131, 
      4.40802865724118, 1.83953936517063, NA, 0.912373581855181, 
      1.09913231244215, 0.337560733242715, NA, 7.34491539548621, 
      2.76116544121873, 0.613067805979508, 3.73620600466885, 10.7257110799379, 
      NA), Logical = c(TRUE, TRUE, FALSE, FALSE, NA, FALSE, FALSE, 
      TRUE, NA, FALSE, FALSE, FALSE, NA, TRUE, FALSE, NA, NA, TRUE, 
      NA, TRUE, TRUE, NA, TRUE, NA, FALSE, FALSE, TRUE, TRUE, TRUE, 
      NA, TRUE, TRUE, FALSE, NA, NA, TRUE, FALSE, FALSE, FALSE, 
      TRUE, FALSE, NA, TRUE, NA, NA, TRUE, TRUE, TRUE, FALSE, NA, 
      FALSE, NA, NA, TRUE, NA, FALSE, NA, TRUE, NA, TRUE, NA, FALSE, 
      TRUE, FALSE, FALSE, TRUE, NA, FALSE, TRUE, NA, FALSE, TRUE, 
      FALSE, FALSE, NA, FALSE, NA, NA, FALSE, FALSE, NA, NA, TRUE, 
      TRUE, NA, NA, TRUE, NA, NA, NA, FALSE, FALSE, NA, NA, FALSE, 
      NA, TRUE, FALSE, TRUE, NA, NA, TRUE, FALSE, FALSE, TRUE, 
      TRUE, FALSE, FALSE, TRUE, NA, FALSE, NA, TRUE, TRUE, TRUE, 
      TRUE, FALSE, TRUE, NA, TRUE, NA, NA, FALSE, NA, FALSE, FALSE, 
      NA, TRUE, FALSE), Factor = c(3L, NA, 3L, 4L, 4L, 4L, 3L, 
      3L, 3L, 4L, 2L, 1L, 1L, 4L, 4L, 3L, 1L, 3L, 1L, 3L, 4L, NA, 
      4L, 2L, 2L, 3L, 3L, 3L, 1L, 3L, 2L, 4L, NA, 1L, 2L, 4L, 4L, 
      1L, 3L, 3L, 3L, NA, 4L, 1L, 1L, 2L, 3L, 4L, 2L, 1L, 1L, NA, 
      3L, 2L, 3L, 4L, 3L, 4L, 1L, 4L, 3L, 3L, 4L, 1L, 2L, 3L, 4L, 
      1L, 3L, 2L, 4L, 4L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 1L, 3L, 2L, 
      1L, 4L, 2L, 3L, 2L, 4L, 2L, 2L, 2L, 4L, 4L, 2L, 4L, 3L, 4L, 
      3L, 1L, 2L, 2L, 2L, 4L, 3L, 3L, 1L, 3L, 1L, NA, 4L, 2L, 4L, 
      3L, 2L, 2L, 4L, 2L, 4L, 3L, 2L, 3L, 4L, 4L, 4L, 3L, 2L, 3L, 
      4L, 3L), Ordered = c(3L, 3L, 3L, NA, 2L, 3L, 1L, 1L, 2L, 
      1L, 2L, 2L, 1L, 3L, 3L, 2L, 2L, 2L, 2L, 1L, 3L, 2L, 3L, 3L, 
      1L, 3L, 3L, 1L, 2L, 1L, 3L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 
      1L, 1L, 3L, 2L, 2L, 1L, 1L, 3L, NA, 1L, 1L, 2L, 3L, 2L, 1L, 
      1L, 2L, 3L, 3L, 2L, 1L, 3L, 2L, 3L, 3L, 2L, 3L, 3L, 1L, 1L, 
      3L, 1L, 2L, 3L, 1L, 2L, 1L, NA, 3L, 2L, 3L, 3L, 2L, 3L, 1L, 
      1L, 3L, 1L, 3L, 1L, 2L, 3L, 2L, 3L, 3L, 2L, 3L, 3L, 1L, 3L, 
      1L, 3L, 2L, 3L, 1L, 3L, NA, 1L, 3L, 1L, 1L, 1L, 3L, 1L, 3L, 
      NA, 3L, 1L, 2L, 3L, 1L, NA, 1L, 3L, 3L, 3L, 1L, 2L, 3L, 1L
      ), Character = c("", "b", "b", "", "", "b", "", "a", "a", 
      "", "", "a", "", "", "", "b", "", "a", "", "a", "a", "b", 
      "a", NA, "b", "b", "b", "b", "", NA, "", "", "b", "", "b", 
      "a", "", "a", "a", "a", "a", "b", "b", "b", "a", "b", "b", 
      "a", "a", "b", NA, "", "a", "b", "", "a", "b", "", "a", "b", 
      "", "a", "", "", "b", "a", "b", "a", "", "a", "b", "", NA, 
      "a", "b", "b", "b", "b", "", "a", "a", "a", "", "a", "", 
      "b", "", "b", "a", "a", "b", "b", "a", "b", "a", "", "a", 
      "b", "a", "b", "", "", "b", "b", "", "b", "a", "b", "", "", 
      "", NA, "", "a", "", "a", "", NA, "a", "b", "", "", "", "a", 
      "a", "b", "", "a", "b"), Date = c(11514, 11506, 11508, 11513, 
      11507, 11509, 11527, 11503, 11501, 11507, 11520, 11501, 11506, 
      11499, 11510, 11515, 11508, 11509, 11521, 11495, 11513, 11513, 
      11510, 11507, 11500, 11507, 11526, 11513, 11511, 11519, 11519, 
      11500, 11510, 11529, 11514, 11503, 11522, 11494, 11495, 11507, 
      11524, 11521, 11512, 11498, 11532, 11502, 11515, 11502, 11514, 
      11501, 11506, 11513, 11506, 11500, 11496, 11502, 11508, 11510, 
      11499, 11506, 11516, 11500, 11505, 11511, 11504, 11510, 11508, 
      NA, 11517, 11514, 11505, 11515, 11510, 11507, 11509, 11502, 
      11510, 11503, 11503, 11504, 11521, 11503, 11516, 11510, 11512, 
      11502, 11518, 11507, 11518, 11507, 11512, 11502, 11513, 11513, 
      11521, 11506, 11511, 11506, 11509, 11510, 11498, 11515, 11506, 
      NA, 11516, 11502, 11504, 11510, 11504, NA, 11521, 11510, 
      11513, 11515, 11508, NA, NA, 11517, 11511, 11517, 11508, 
      11514, 11512, 11517, 11512, 11510, 11505, NA, 11500), NA_Factor_with_levels = c(NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_), NA_Factor_without_levels = c(NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
      NA_integer_, NA_integer_, NA_integer_), NA_Numeric = c(NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_), NA_logical = c(NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
      NA, NA, NA), Factor_non_valid_levels = c(3L, NA, 3L, 4L, 
      4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 1L, 4L, 4L, 3L, 1L, 3L, 1L, 
      3L, 4L, NA, 4L, 2L, 2L, 3L, 3L, 3L, 1L, 3L, 2L, 4L, NA, 1L, 
      2L, 4L, 4L, 1L, 3L, 3L, 3L, NA, 4L, 1L, 1L, 2L, 3L, 4L, 2L, 
      1L, 1L, NA, 3L, 2L, 3L, 4L, 3L, 4L, 1L, 4L, 3L, 3L, 4L, 1L, 
      2L, 3L, 4L, 1L, 3L, 2L, 4L, 4L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 
      1L, 3L, 2L, 1L, 4L, 2L, 3L, 2L, 4L, 2L, 2L, 2L, 4L, 4L, 2L, 
      4L, 3L, 4L, 3L, 1L, 2L, 2L, 2L, 4L, 3L, 3L, 1L, 3L, 1L, NA, 
      4L, 2L, 4L, 3L, 2L, 2L, 4L, 2L, 4L, 3L, 2L, 3L, 4L, 4L, 4L, 
      3L, 2L, 3L, 4L, 3L), Split2_non_valid_levels = c(1L, 1L, 
      1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 
      2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 
      1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 
      1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 
      1L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 
      1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 
      2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 
      2L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 
      2L, 2L, 1L, 2L, 1L, 2L, 1L), Split1_non_valid_levels = c(1L, 
      1L, 3L, 1L, 2L, 2L, 1L, 3L, 2L, 1L, 2L, 1L, 1L, 3L, 2L, 1L, 
      1L, 3L, 2L, 2L, 1L, 3L, 1L, 1L, 3L, 2L, 2L, 1L, 2L, 1L, 1L, 
      1L, 2L, 1L, 3L, 1L, 3L, 3L, 1L, 2L, 2L, 2L, 3L, 1L, 2L, 1L, 
      1L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 3L, 1L, 1L, 3L, 3L, 2L, 1L, 
      1L, 1L, 2L, 1L, 3L, 3L, 1L, 1L, 3L, 3L, 3L, 3L, 2L, 3L, 1L, 
      3L, 2L, 2L, 3L, 2L, 3L, 2L, 2L, 1L, 2L, 3L, 3L, 3L, 3L, 1L, 
      3L, 3L, 1L, 1L, 1L, 3L, 2L, 1L, 2L, 2L, 3L, 3L, 2L, 1L, 1L, 
      1L, 1L, 2L, 3L, 2L, 1L, 1L, 2L, 2L, 2L, 3L, 2L, 2L, 1L, 2L, 
      2L, 2L, 2L, 1L, 2L, 1L, 1L, 3L), Group_non_valid_levels2 = c(2L, 
      2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 
      2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 
      1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 
      2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 
      2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 
      2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 
      2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 
      2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 
      2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L), Group_non_valid_levels = c(2L, 
      2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 
      2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 
      1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 
      2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 
      2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 
      2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 
      2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 
      2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 
      2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L)), target_cols = c("Logical", 
  "Numeric", "Factor", "Ordered", "Character"), group_col = "Group", 
      split_cols = c("Split1", "Split2"), format_to = "Latex")
  where 13: atable(x = list(Split1 = c(1L, 1L, 3L, 1L, 2L, 2L, 1L, 3L, 2L, 
  1L, 2L, 1L, 1L, 3L, 2L, 1L, 1L, 3L, 2L, 2L, 1L, 3L, 1L, 1L, 3L, 
  2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 3L, 1L, 3L, 3L, 1L, 2L, 2L, 
  2L, 3L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 3L, 1L, 1L, 
  3L, 3L, 2L, 1L, 1L, 1L, 2L, 1L, 3L, 3L, 1L, 1L, 3L, 3L, 3L, 3L, 
  2L, 3L, 1L, 3L, 2L, 2L, 3L, 2L, 3L, 2L, 2L, 1L, 2L, 3L, 3L, 3L, 
  3L, 1L, 3L, 3L, 1L, 1L, 1L, 3L, 2L, 1L, 2L, 2L, 3L, 3L, 2L, 1L, 
  1L, 1L, 1L, 2L, 3L, 2L, 1L, 1L, 2L, 2L, 2L, 3L, 2L, 2L, 1L, 2L, 
  2L, 2L, 2L, 1L, 2L, 1L, 1L, 3L), Split2 = c(1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 
  1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 
  2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 
  2L, 2L, 1L, 1L, 1L, 1L, 2L,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3L, 1L, 2L, 1L, 1L, 2L, 2L, 3L, 2L, 3L, 1L, 2L, 1L, 
  3L, 2L, 1L, 2L, 2L, 3L, 2L, 2L, 1L, 1L, 3L, 3L, 3L, 2L, 1L, 3L, 
  1L, 1L, 2L, 1L, 1L, 2L, 3L, 2L, 1L, 3L, 3L, 2L, 2L, 2L, 3L, 1L, 
  3L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 1L, 1L, 3L, 2L, 3L, 2L, 2L, 
  1L, 3L, 1L, 1L, 1L, 1L, 1L, 2L, 3L, 1L, 3L, 2L, 1L, 3L, 1L, 1L, 
  3L, 1L, 1L, 2L, 2L), Numeric = c(-1.01759611982611, -0.383283959886278, 
  0.872755411671399, 0.969545013970117, 0.383846665027094, -1.85155566306746, 
  -0.0539967368261657, 1.06477321433828, 0.813195037411605, -0.190816474104282, 
  -2.6999298085637, 0.0609666388011166, 0.573751697483578, NA, 
  0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 0.470393399873943, 
  -1.2426702705746, 1.38157545638553, 1.20445893700982, 0.824073963681881, 
  -1.66262940218559, -0.569306343605481, 0.635513817289526, 0.0437220075778579, 
  0.348012303661307, 2.45959354887041, -0.818380324399669, -2.11320011492914, 
  0.273695272430415, NA, 0.446041052961866, -0.812384723790597, 
  NA, -0.12370597157743, -0.477335506030052, -0.166261491486608, 
  0.862563383626431, 0.0973404852028189, -1.62561673921129, -0.0046207678264578, 
  0.760242167662055, 0.0389909128725626, 0.735072141614441, -0.14647262699887, 
  NA, 0.482369466104533, 0.992943636775734, -1.24639549803204, 
  -0.0334875248456097, -0.0709621812499963, -0.758920653730951, 
  -1.03435936093915, -0.630731953970819, 0.586807720012995, -0.416322656183652, 
  -0.78488780950532, 0.163416319486097, -1.23671423510935, 1.04587377623667, 
  -0.484595416218709, 0.189128811680665, NA, -0.000240668886441977, 
  1.80938204244287, -0.825327957109945, 1.14547045222799, 0.0315731875532431, 
  -0.83520580530672, -0.0687636490165125, 0.746771687012467, -0.425518734394604, 
  -0.772082235193457, 0.152764106747895, 0.988596845178799, -0.073458334672174, 
  -1.38702655355974, -1.30667590437536, -0.768395325077939, -0.527108125374458, 
  -0.0214270650416246, 0.670498070996282, -0.434617038572407, -1.11387978331285, 
  0.6071059948785, 0.275456968739591, NA, -1.68248085947826, NA, 
  1.35336189394267, 0.724173800683369, -0.832552825764212, 0.732528486768414, 
  -0.871926869997213, -0.453397511229793, 1.18753427862908, -0.290145311790079, 
  NA, -0.291227708779169, NA, -0.848815696948922, -1.08851986195719, 
  -0.484290571117173, -0.336311209009573, NA, -0.243247228574846, 
  1.89220204160011, -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
  0.0885218957136163, 1.23915070840056, -1.64455553575371, 1.44635652537848, 
  -0.690560171665183, -0.276431085453852, -1.10941875989944, 0.133869316429452, 
  1.78533905173155, 2.42216335525159, -1.07682890211841, 0.485941110403099, 
  1.38852173874429, -0.195656817284544, -0.218174797706211, -0.304777954546445
  ), Numeric2 = c(5.79349817233433, 8.19228823244728, 6.06285928371989, 
  4.96056404289091, 3.09439022266822, 5.49504605667385, 2.35138924624973, 
  3.16223048908827, 7.2895403293352, 5.32603926453643, 4.72304888207834, 
  3.23317703393344, 6.79309870445465, 8.00473775612642, 1.39218470837367, 
  NA, 4.14720073957576, 2.26493281491731, 1.00378403201199, 3.9927016599802, 
  5.96653564843891, 8.43052683692966, NA, 1.89268158006277, 3.06570934596424, 
  -0.989471092002128, 1.74839967462313, 1.66794472245547, 1.83229090042119, 
  -2.56650379744121, 4.64025565085966, 2.10423119123551, 8.56147358149649, 
  6.38786784824525, -0.360588695398398, 4.29518626301752, 2.21868704730054, 
  6.66484350590355, 4.159211246496, 2.32892912246603, 5.31519110851816, 
  4.45782447592726, 3.50614725475131, 10.0596718644279, 2.41184234104822, 
  2.58763908104787, -0.637810772052571, 3.87841983011447, 6.67106891641203, 
  -2.21416355278764, 3.24980463978094, 0.455048720040046, 8.32581179505072, 
  8.07368661663659, 5.00350854202195, 8.28801424120068, 1.39804644736395, 
  6.85195517491566, 2.2449654741003, 4.96287256757689, 3.10181195000527, 
  3.16437075012079, 5.6383454749886, 0.0885365390653829, 3.24725660487262, 
  4.51302212115373, 2.78959756375747, 4.31397832250718, 3.04335763979797, 
  8.85503180765028, NA, 12.8975961094997, 1.61476718632237, 6.44309774403974, 
  10.2940924303911, 4.90294016545771, 0.750774574482307, 0.981032494590146, 
  3.89375630524716, 7.92737308256024, 6.25120145994016, -2.41510498283726, 
  1.8989376734001, 3.97283057412104, -0.374400461734306, 6.08358893948461, 
  -3.38400642555946, 4.42986929212137, 2.82633364261883, 2.52650774315777, 
  3.14905764264385, 4.94438441412353, 5.18897973381697, 3.32318886689212, 
  -1.77485129102168, -0.317687894965937, -0.408973321917204, 6.2855903406758, 
  3.26915505438616, 4.80902982225402, -0.676782562867448, 2.39323597991106, 
  5.68735591952049, 3.46502162974024, 3.65459204139205, 3.7838155836809, 
  7.63272942077891, 2.15530929760089, 6.0283793749441, 6.69579881661266, 
  0.43204628943694, 4.36377654945703, 3.96633494160877, 7.08742215794128, 
  6.74432460315884, 3.99263119996131, 4.40802865724118, 1.83953936517063, 
  NA, 0.912373581855181, 1.09913231244215, 0.337560733242715, NA, 
  7.34491539548621, 2.76116544121873, 0.613067805979508, 3.73620600466885, 
  10.7257110799379, NA), Logical = c(TRUE, TRUE, FALSE, FALSE, 
  NA, FALSE, FALSE, TRUE, NA, FALSE, FALSE, FALSE, NA, TRUE, FALSE, 
  NA, NA, TRUE, NA, TRUE, TRUE, NA, TRUE, NA, FALSE, FALSE, TRUE, 
  TRUE, TRUE, NA, TRUE, TRUE, FALSE, NA, NA, TRUE, FALSE, FALSE, 
  FALSE, TRUE, FALSE, NA, TRUE, NA, NA, TRUE, TRUE, TRUE, FALSE, 
  NA, FALSE, NA, NA, TRUE, NA, FALSE, NA, TRUE, NA, TRUE, NA, FALSE, 
  TRUE, FALSE, FALSE, TRUE, NA, FALSE, TRUE, NA, FALSE, TRUE, FALSE, 
  FALSE, NA, FALSE, NA, NA, FALSE, FALSE, NA, NA, TRUE, TRUE, NA, 
  NA, TRUE, NA, NA, NA, FALSE, FALSE, NA, NA, FALSE, NA, TRUE, 
  FALSE, TRUE, NA, NA, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, 
  TRUE, NA, FALSE, NA, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NA, 
  TRUE, NA, NA, FALSE, NA, FALSE, FALSE, NA, TRUE, FALSE), Factor = c(3L, 
  NA, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 1L, 4L, 4L, 3L, 1L, 
  3L, 1L, 3L, 4L, NA, 4L, 2L, 2L, 3L, 3L, 3L, 1L, 3L, 2L, 4L, NA, 
  1L, 2L, 4L, 4L, 1L, 3L, 3L, 3L, NA, 4L, 1L, 1L, 2L, 3L, 4L, 2L, 
  1L, 1L, NA, 3L, 2L, 3L, 4L, 3L, 4L, 1L, 4L, 3L, 3L, 4L, 1L, 2L, 
  3L, 4L, 1L, 3L, 2L, 4L, 4L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 1L, 3L, 
  2L, 1L, 4L, 2L, 3L, 2L, 4L, 2L, 2L, 2L, 4L, 4L, 2L, 4L, 3L, 4L, 
  3L, 1L, 2L, 2L, 2L, 4L, 3L, 3L, 1L, 3L, 1L, NA, 4L, 2L, 4L, 3L, 
  2L, 2L, 4L, 2L, 4L, 3L, 2L, 3L, 4L, 4L, 4L, 3L, 2L, 3L, 4L, 3L
  ), Ordered = c(3L, 3L, 3L, NA, 2L, 3L, 1L, 1L, 2L, 1L, 2L, 2L, 
  1L, 3L, 3L, 2L, 2L, 2L, 2L, 1L, 3L, 2L, 3L, 3L, 1L, 3L, 3L, 1L, 
  2L, 1L, 3L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 3L, 2L, 2L, 
  1L, 1L, 3L, NA, 1L, 1L, 2L, 3L, 2L, 1L, 1L, 2L, 3L, 3L, 2L, 1L, 
  3L, 2L, 3L, 3L, 2L, 3L, 3L, 1L, 1L, 3L, 1L, 2L, 3L, 1L, 2L, 1L, 
  NA, 3L, 2L, 3L, 3L, 2L, 3L, 1L, 1L, 3L, 1L, 3L, 1L, 2L, 3L, 2L, 
  3L, 3L, 2L, 3L, 3L, 1L, 3L, 1L, 3L, 2L, 3L, 1L, 3L, NA, 1L, 3L, 
  1L, 1L, 1L, 3L, 1L, 3L, NA, 3L, 1L, 2L, 3L, 1L, NA, 1L, 3L, 3L, 
  3L, 1L, 2L, 3L, 1L), Character = c("", "b", "b", "", "", "b", 
  "", "a", "a", "", "", "a", "", "", "", "b", "", "a", "", "a", 
  "a", "b", "a", NA, "b", "b", "b", "b", "", NA, "", "", "b", "", 
  "b", "a", "", "a", "a", "a", "a", "b", "b", "b", "a", "b", "b", 
  "a", "a", "b", NA, "", "a", "b", "", "a", "b", "", "a", "b", 
  "", "a", "", "", "b", "a", "b", "a", "", "a", "b", "", NA, "a", 
  "b", "b", "b", "b", "", "a", "a", "a", "", "a", "", "b", "", 
  "b", "a", "a", "b", "b", "a", "b", "a", "", "a", "b", "a", "b", 
  "", "", "b", "b", "", "b", "a", "b", "", "", "", NA, "", "a", 
  "", "a", "", NA, "a", "b", "", "", "", "a", "a", "b", "", "a", 
  "b"), Date = c(11514, 11506, 11508, 11513, 11507, 11509, 11527, 
  11503, 11501, 11507, 11520, 11501, 11506, 11499, 11510, 11515, 
  11508, 11509, 11521, 11495, 11513, 11513, 11510, 11507, 11500, 
  11507, 11526, 11513, 11511, 11519, 11519, 11500, 11510, 11529, 
  11514, 11503, 11522, 11494, 11495, 11507, 11524, 11521, 11512, 
  11498, 11532, 11502, 11515, 11502, 11514, 11501, 11506, 11513, 
  11506, 11500, 11496, 11502, 11508, 11510, 11499, 11506, 11516, 
  11500, 11505, 11511, 11504, 11510, 11508, NA, 11517, 11514, 11505, 
  11515, 11510, 11507, 11509, 11502, 11510, 11503, 11503, 11504, 
  11521, 11503, 11516, 11510, 11512, 11502, 11518, 11507, 11518, 
  11507, 11512, 11502, 11513, 11513, 11521, 11506, 11511, 11506, 
  11509, 11510, 11498, 11515, 11506, NA, 11516, 11502, 11504, 11510, 
  11504, NA, 11521, 11510, 11513, 11515, 11508, NA, NA, 11517, 
  11511, 11517, 11508, 11514, 11512, 11517, 11512, 11510, 11505, 
  NA, 11500), NA_Factor_with_levels = c(NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_), NA_Factor_without_levels = c(NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
  NA_integer_, NA_integer_, NA_integer_), NA_Numeric = c(NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
  NA_real_, NA_real_), NA_logical = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), Factor_non_valid_levels = c(3L, 
  NA, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 1L, 4L, 4L, 3L, 1L, 
  3L, 1L, 3L, 4L, NA, 4L, 2L, 2L, 3L, 3L, 3L, 1L, 3L, 2L, 4L, NA, 
  1L, 2L, 4L, 4L, 1L, 3L, 3L, 3L, NA, 4L, 1L, 1L, 2L, 3L, 4L, 2L, 
  1L, 1L, NA, 3L, 2L, 3L, 4L, 3L, 4L, 1L, 4L, 3L, 3L, 4L, 1L, 2L, 
  3L, 4L, 1L, 3L, 2L, 4L, 4L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 1L, 3L, 
  2L, 1L, 4L, 2L, 3L, 2L, 4L, 2L, 2L, 2L, 4L, 4L, 2L, 4L, 3L, 4L, 
  3L, 1L, 2L, 2L, 2L, 4L, 3L, 3L, 1L, 3L, 1L, NA, 4L, 2L, 4L, 3L, 
  2L, 2L, 4L, 2L, 4L, 3L, 2L, 3L, 4L, 4L, 4L, 3L, 2L, 3L, 4L, 3L
  ), Split2_non_valid_levels = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L,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 2L, 1L, 1L, 1L, 2L, 2L, 1L
  )), target_cols = c("Logical", "Numeric", "Factor", "Ordered", 
  "Character"), group_col = "Group", split_cols = c("Split1", "Split2"
  ), format_to = "Latex")
  where 14: FUN(X[[i]], ...)
  where 15 at test_atable.R#129: lapply(the_arg_list, do.call, what = "atable")
  where 16: eval(code, test_env)
  where 17: eval(code, test_env)
  where 18: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 24: tryCatchList(expr, classes, parentenv, handlers)
  where 25: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 26: test_code(NULL, exprs, env)
  where 27: source_file(path, child_env(env), wrap = wrap)
  where 28: FUN(X[[i]], ...)
  where 29: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  where 30: doTryCatch(return(expr), name, parentenv, handler)
  where 31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 32: tryCatchList(expr, classes, parentenv, handlers)
  where 33: tryCatch(code, testthat_abort_reporter = function(cnd) {
      cat(conditionMessage(cnd), "\n")
      NULL
  })
  where 34: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 
      env = env, wrap = wrap))
  where 35: test_files(test_dir = test_dir, test_package = test_package, 
      test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 
      env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package)
  where 36: test_files(test_dir = path, test_paths = test_paths, test_package = package, 
      reporter = reporter, load_helpers = load_helpers, env = env, 
      stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package, parallel = parallel)
  where 37: test_dir("testthat", package = package, reporter = reporter, 
      ..., load_package = "installed")
  where 38: test_check("atable")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (value, group, two_sample_htest.numeric = NULL, ...) 
  {
      if (is.function(two_sample_htest.numeric)) 
          return(two_sample_htest.numeric(value, group, ...))
      if (is.function(atable_options("two_sample_htest.numeric"))) 
          return(atable_options("two_sample_htest.numeric")(value, 
              group, ...))
      d <- data.frame(value = value, group = group)
      group_levels <- levels(group)
      x <- subset(d, group %in% group_levels[1], select = "value", 
          drop = TRUE)
      y <- subset(d, group %in% group_levels[2], select = "value", 
          drop = TRUE)
      test <- try(stats::ks.test(x, y, alternative = c("two.sided"), 
          ...), silent = TRUE)
      out <- if (class(test) == "try-error") {
          warning("Not enough values. Returning p.value=NaN.")
          test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
          test <- plyr::llply(test, function(x) NA)
          test$method <- "Two-sample Kolmogorov-Smirnov test"
          test$p.value <- NaN
          test$statistic <- NaN
          class(test) <- "htest"
          test
      }
      else {
          test
      }
      effect_size_test <- try(effsize::cohen.d(d = value, f = group, 
          na.rm = TRUE), silent = TRUE)
      effect_size <- if (class(effect_size_test) == "try-error") {
          warning("Not enough values. Returning effect size NaN.")
          list(estimate = NaN, conf.int = c(NaN, NaN))
      }
      else {
          effect_size_test
      }
      out$effect_size <- effect_size$estimate
      out$effect_size_CI_lower <- effect_size$conf.int[1]
      out$effect_size_CI_upper <- effect_size$conf.int[2]
      class(out) <- c("htest_with_effect_size", class(out))
      return(out)
  }
  <bytecode: 0xb614678>
  <environment: namespace:atable>
   --- function search by body ---
  Function two_sample_htest.numeric in namespace atable has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  atable
   --- call from context --- 
  two_sample_htest.numeric(value, group, ...)
   --- call from argument --- 
  if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }
   --- R stacktrace ---
  where 1: two_sample_htest.numeric(value, group, ...)
  where 2: two_sample_htest(value, group, ...)
  where 3: (function (DD, group_col, value_col, ...) 
  {
      stopifnot(is.character(group_col), length(group_col) == 1, 
          is.character(value_col), length(value_col) == 1, group_col %in% 
              colnames(DD), value_col %in% colnames(DD), is.factor(DD[[group_col]]))
      value <- DD[[value_col]]
      group <- DD[[group_col]]
      group_levels <- levels(DD[[group_col]])
      result <- if (length(group_levels) == 2) {
          two_sample_htest(value, group, ...)
      }
      else {
          multi_sample_htest(value, group, ...)
      }
      return(result)
  })(value_col = dots[[1L]][[1L]], DD = list(Numeric = c(-1.01759611982611, 
  -0.383283959886278, 0.872755411671399, 0.969545013970117, 0.383846665027094, 
  -1.85155566306746, -0.0539967368261657, 1.06477321433828, 0.813195037411605, 
  -0.190816474104282, -2.6999298085637, 0.0609666388011166, 0.573751697483578, 
  NA, 0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 
  0.470393399873943, -1.2426702705746, 1.38157545638553, 1.20445893700982, 
  0.824073963681881, -1.66262940218559, -0.569306343605481, 0.635513817289526, 
  0.0437220075778579, 0.348012303661307, 2.45959354887041, -0.818380324399669, 
  -2.11320011492914, 0.273695272430415, NA, 0.446041052961866, 
  -0.812384723790597, NA, -0.12370597157743, -0.477335506030052, 
  -0.166261491486608, 0.862563383626431, 0.0973404852028189, -1.62561673921129, 
  -0.0046207678264578, 0.760242167662055, 0.0389909128725626, 0.735072141614441, 
  -0.14647262699887, NA, 0.482369466104533, 0.992943636775734, 
  -1.24639549803204, -0.0334875248456097, -0.0709621812499963, 
  -0.758920653730951, -1.03435936093915, -0.630731953970819, 0.586807720012995, 
  -0.416322656183652, -0.78488780950532, 0.163416319486097, -1.23671423510935, 
  1.04587377623667, -0.484595416218709, 0.189128811680665, NA, 
  -0.000240668886441977, 1.80938204244287, -0.825327957109945, 
  1.14547045222799, 0.0315731875532431, -0.83520580530672, -0.0687636490165125, 
  0.746771687012467, -0.425518734394604, -0.772082235193457, 0.152764106747895, 
  0.988596845178799, -0.073458334672174, -1.38702655355974, -1.30667590437536, 
  -0.768395325077939, -0.527108125374458, -0.0214270650416246, 
  0.670498070996282, -0.434617038572407, -1.11387978331285, 0.6071059948785, 
  0.275456968739591, NA, -1.68248085947826, NA, 1.35336189394267, 
  0.724173800683369, -0.832552825764212, 0.732528486768414, -0.871926869997213, 
  -0.453397511229793, 1.18753427862908, -0.290145311790079, NA, 
  -0.291227708779169, NA, -0.848815696948922, -1.08851986195719, 
  -0.484290571117173, -0.336311209009573, NA, -0.243247228574846, 
  1.89220204160011, -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
  0.0885218957136163, 1.23915070840056, -1.64455553575371, 1.44635652537848, 
  -0.690560171665183, -0.276431085453852, -1.10941875989944, 0.133869316429452, 
  1.78533905173155, 2.42216335525159, -1.07682890211841, 0.485941110403099, 
  1.38852173874429, -0.195656817284544, -0.218174797706211, -0.304777954546445
  ), Factor = c(3L, NA, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 
  1L, 4L, 4L, 3L, 1L, 3L, 1L, 3L, 4L, NA, 4L, 2L, 2L, 3L, 3L, 3L, 
  1L, 3L, 2L, 4L, NA, 1L, 2L, 4L, 4L, 1L, 3L, 3L, 3L, NA, 4L, 1L, 
  1L, 2L, 3L, 4L, 2L, 1L,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, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
  1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 
  1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 
  2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 
  1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 
  2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L), Observations = c(0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
  )), group_col = "Group", format_statistics.statistics_factor = function (x, 
      ...) 
  {
      nn <- names(x)
      value <- unlist(x)
      total <- sum(value)
      percent <- 100 * value/total
      if (length(nn) <= 3) {
          value <- paste0(atable_options("format_percent")(percent[1]), 
              "% (", atable_options("format_numbers")(value[1]), 
              ")")
          format_statistics_out <- data.frame(tag = factor(nn[1], 
              levels = nn[1]), value = value[1], row.names = NULL, 
              stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
      else {
          value <- paste0(atable_options("format_percent")(percent), 
              "% (", atable_options("format_numbers")(value), ")")
          format_statistics_out <- data.frame(tag = factor(nn, 
              levels = nn), value = value, row.names = NULL, stringsAsFactors = FALSE, 
              check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
  }, format_statistics.statistics_numeric = function (x, ...) 
  {
      the_mean <- atable_options("format_numbers")(x$mean)
      the_sd <- atable_options("format_numbers")(x$sd)
      values <- c(Mean_SD = paste0(the_mean, " (", the_sd, ")"))
      format_statistics_out <- data.frame(tag = factor("remove_me", 
          levels = "remove_me"), value = values, row.names = NULL, 
          stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
      return(format_statistics_out)
  })
  where 4: mapply(test_caller, value_col = target_cols, MoreArgs = list(DD = DD, 
      group_col = group_col, ...), SIMPLIFY = FALSE)
  where 5: apply_tests_helper(DD, target_cols, group_col, ...)
  where 6: atable_unsplitted_grouped(DD = DD, target_cols = target_cols, 
      group_col = group_col, Alias_mapping = Alias_mapping, split_cols = split_cols, 
      format_to = format_to, blocks = blocks, indent_character = indent_character, 
      indent = indent, ...)
  where 7: atable.data.frame(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 8: atable(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 9: atable_compact.data.frame(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2"), group_col = "Group")
  where 10 at test_atable_compact.R#27: atable_compact(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2"), group_col = "Group")
  where 11: eval(code, test_env)
  where 12: eval(code, test_env)
  where 13: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 19: tryCatchList(expr, classes, parentenv, handlers)
  where 20: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 21: test_code(desc, code, env = parent.frame(), reporter = reporter)
  where 22 at test_atable_compact.R#26: test_that("grouped", {
      tab = atable_compact(atable::test_data, target_cols = c("Numeric", 
          "Factor", "Split2"), group_col = "Group")
      expect_true(is.data.frame(tab))
      expect_true(ncol(tab) == 6)
      expect_true(nrow(tab) == 9)
  })
  where 23: eval(code, test_env)
  where 24: eval(code, test_env)
  where 25: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 29: doTryCatch(return(expr), name, parentenv, handler)
  where 30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 31: tryCatchList(expr, classes, parentenv, handlers)
  where 32: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 33: test_code(NULL, exprs, env)
  where 34: source_file(path, child_env(env), wrap = wrap)
  where 35: FUN(X[[i]], ...)
  where 36: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  where 37: doTryCatch(return(expr), name, parentenv, handler)
  where 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 39: tryCatchList(expr, classes, parentenv, handlers)
  where 40: tryCatch(code, testthat_abort_reporter = function(cnd) {
      cat(conditionMessage(cnd), "\n")
      NULL
  })
  where 41: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 
      env = env, wrap = wrap))
  where 42: test_files(test_dir = test_dir, test_package = test_package, 
      test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 
      env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package)
  where 43: test_files(test_dir = path, test_paths = test_paths, test_package = package, 
      reporter = reporter, load_helpers = load_helpers, env = env, 
      stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package, parallel = parallel)
  where 44: test_dir("testthat", package = package, reporter = reporter, 
      ..., load_package = "installed")
  where 45: test_check("atable")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (value, group, two_sample_htest.numeric = NULL, ...) 
  {
      if (is.function(two_sample_htest.numeric)) 
          return(two_sample_htest.numeric(value, group, ...))
      if (is.function(atable_options("two_sample_htest.numeric"))) 
          return(atable_options("two_sample_htest.numeric")(value, 
              group, ...))
      d <- data.frame(value = value, group = group)
      group_levels <- levels(group)
      x <- subset(d, group %in% group_levels[1], select = "value", 
          drop = TRUE)
      y <- subset(d, group %in% group_levels[2], select = "value", 
          drop = TRUE)
      test <- try(stats::ks.test(x, y, alternative = c("two.sided"), 
          ...), silent = TRUE)
      out <- if (class(test) == "try-error") {
          warning("Not enough values. Returning p.value=NaN.")
          test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
          test <- plyr::llply(test, function(x) NA)
          test$method <- "Two-sample Kolmogorov-Smirnov test"
          test$p.value <- NaN
          test$statistic <- NaN
          class(test) <- "htest"
          test
      }
      else {
          test
      }
      effect_size_test <- try(effsize::cohen.d(d = value, f = group, 
          na.rm = TRUE), silent = TRUE)
      effect_size <- if (class(effect_size_test) == "try-error") {
          warning("Not enough values. Returning effect size NaN.")
          list(estimate = NaN, conf.int = c(NaN, NaN))
      }
      else {
          effect_size_test
      }
      out$effect_size <- effect_size$estimate
      out$effect_size_CI_lower <- effect_size$conf.int[1]
      out$effect_size_CI_upper <- effect_size$conf.int[2]
      class(out) <- c("htest_with_effect_size", class(out))
      return(out)
  }
  <bytecode: 0xb614678>
  <environment: namespace:atable>
   --- function search by body ---
  Function two_sample_htest.numeric in namespace atable has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  atable
   --- call from context --- 
  two_sample_htest.numeric(value, group, ...)
   --- call from argument --- 
  if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }
   --- R stacktrace ---
  where 1: two_sample_htest.numeric(value, group, ...)
  where 2: two_sample_htest(value, group, ...)
  where 3: (function (DD, group_col, value_col, ...) 
  {
      stopifnot(is.character(group_col), length(group_col) == 1, 
          is.character(value_col), length(value_col) == 1, group_col %in% 
              colnames(DD), value_col %in% colnames(DD), is.factor(DD[[group_col]]))
      value <- DD[[value_col]]
      group <- DD[[group_col]]
      group_levels <- levels(DD[[group_col]])
      result <- if (length(group_levels) == 2) {
          two_sample_htest(value, group, ...)
      }
      else {
          multi_sample_htest(value, group, ...)
      }
      return(result)
  })(value_col = dots[[1L]][[1L]], DD = list(Numeric = c(-1.01759611982611, 
  -0.383283959886278, 0.872755411671399, 0.969545013970117, 0.383846665027094, 
  -1.85155566306746, -0.0539967368261657, 1.06477321433828, 0.813195037411605, 
  -0.190816474104282, -2.6999298085637, 0.0609666388011166, 0.573751697483578, 
  NA, 0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 
  0.470393399873943, -1.2426702705746, 1.38157545638553, 1.20445893700982, 
  0.824073963681881, -1.66262940218559, -0.569306343605481, 0.635513817289526, 
  0.0437220075778579, 0.348012303661307, 2.45959354887041, -0.818380324399669, 
  -2.11320011492914, 0.273695272430415, NA, 0.446041052961866, 
  -0.812384723790597, NA, -0.12370597157743, -0.477335506030052, 
  -0.166261491486608, 0.862563383626431, 0.0973404852028189, -1.62561673921129, 
  -0.0046207678264578, 0.760242167662055, 0.0389909128725626, 0.735072141614441, 
  -0.14647262699887, NA, 0.482369466104533, 0.992943636775734, 
  -1.24639549803204, -0.0334875248456097, -0.0709621812499963, 
  -0.758920653730951, -1.03435936093915, -0.630731953970819, 0.586807720012995, 
  -0.416322656183652, -0.78488780950532, 0.163416319486097, -1.23671423510935, 
  1.04587377623667, -0.484595416218709, 0.189128811680665, NA, 
  -0.000240668886441977, 1.80938204244287, -0.825327957109945, 
  1.14547045222799, 0.0315731875532431, -0.83520580530672, -0.0687636490165125, 
  0.746771687012467, -0.425518734394604, -0.772082235193457, 0.152764106747895, 
  0.988596845178799, -0.073458334672174, -1.38702655355974, -1.30667590437536, 
  -0.768395325077939, -0.527108125374458, -0.0214270650416246, 
  0.670498070996282, -0.434617038572407, -1.11387978331285, 0.6071059948785, 
  0.275456968739591, NA, -1.68248085947826, NA, 1.35336189394267, 
  0.724173800683369, -0.832552825764212, 0.732528486768414, -0.871926869997213, 
  -0.453397511229793, 1.18753427862908, -0.290145311790079, NA, 
  -0.291227708779169, NA, -0.848815696948922, -1.08851986195719, 
  -0.484290571117173, -0.336311209009573, NA, -0.243247228574846, 
  1.89220204160011, -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
  0.0885218957136163, 1.23915070840056, -1.64455553575371, 1.44635652537848, 
  -0.690560171665183, -0.276431085453852, -1.10941875989944, 0.133869316429452, 
  1.78533905173155, 2.42216335525159, -1.07682890211841, 0.485941110403099, 
  1.38852173874429, -0.195656817284544, -0.218174797706211, -0.304777954546445
  ), Factor = c(3L, NA, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 
  1L, 4L, 4L, 3L, 1L, 3L, 1L, 3L, 4L, NA, 4L, 2L, 2L, 3L, 3L, 3L, 
  1L, 3L, 2L, 4L, NA, 1L, 2L, 4L, 4L, 1L, 3L, 3L, 3L, NA, 4L, 1L, 
  1L, 2L, 3L, 4L, 2L, 1L, 1L, NA, 3L, 2L, 3L, 4L, 3L, 4L, 1L, 4L, 
  3L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 3L, 2L, 4L, 4L, 2L, 2L, 3L, 3L, 
  3L, 3L, 4L, 1L, 3L, 2L, 1L, 4L, 2L, 3L, 2L, 4L, 2L, 2L, 2L, 4L, 
  4L, 2L, 4L, 3L, 4L, 3L, 1L, 2L, 2L, 2L, 4L, 3L, 3L, 1L, 3L, 1L, 
  NA, 4L, 2L, 4L, 3L, 2L, 2L, 4L, 2L, 4L, 3L, 2L, 3L, 4L, 4L, 4L, 
  3L, 2L, 3L, 4L, 3L), Split2 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 
  2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1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0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
  )), group_col = "Group", format_statistics.statistics_factor = function (x, 
      ...) 
  {
      nn <- names(x)
      value <- unlist(x)
      total <- sum(value)
      percent <- 100 * value/total
      if (length(nn) <= 3) {
          value <- paste0(atable_options("format_percent")(percent[1]), 
              "% (", atable_options("format_numbers")(value[1]), 
              ")")
          format_statistics_out <- data.frame(tag = factor(nn[1], 
              levels = nn[1]), value = value[1], row.names = NULL, 
              stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
      else {
          value <- paste0(atable_options("format_percent")(percent), 
              "% (", atable_options("format_numbers")(value), ")")
          format_statistics_out <- data.frame(tag = factor(nn, 
              levels = nn), value = value, row.names = NULL, stringsAsFactors = FALSE, 
              check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
  }, format_statistics.statistics_numeric = function (x, ...) 
  {
      the_mean <- atable_options("format_numbers")(x$mean)
      the_sd <- atable_options("format_numbers")(x$sd)
      values <- c(Mean_SD = paste0(the_mean, " (", the_sd, ")"))
      format_statistics_out <- data.frame(tag = factor("remove_me", 
          levels = "remove_me"), value = values, row.names = NULL, 
          stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
      return(format_statistics_out)
  })
  where 4: mapply(test_caller, value_col = target_cols, MoreArgs = list(DD = DD, 
      group_col = group_col, ...), SIMPLIFY = FALSE)
  where 5: apply_tests_helper(DD, target_cols, group_col, ...)
  where 6: atable_unsplitted_grouped(DD = DD, target_cols = target_cols, 
      group_col = group_col, Alias_mapping = Alias_mapping, split_cols = split_cols, 
      format_to = format_to, blocks = blocks, indent_character = indent_character, 
      indent = indent, ...)
  where 7: atable.data.frame(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 8: atable(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 9: atable_compact.data.frame(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2"), group_col = "Group", add_margins = TRUE)
  where 10 at test_atable_compact.R#37: atable_compact(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2"), group_col = "Group", add_margins = TRUE)
  where 11: eval(code, test_env)
  where 12: eval(code, test_env)
  where 13: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 19: tryCatchList(expr, classes, parentenv, handlers)
  where 20: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 21: test_code(desc, code, env = parent.frame(), reporter = reporter)
  where 22 at test_atable_compact.R#36: test_that("grouped margins", {
      tab = atable_compact(atable::test_data, target_cols = c("Numeric", 
          "Factor", "Split2"), group_col = "Group", add_margins = TRUE)
      expect_true(is.data.frame(tab))
      expect_true(ncol(tab) == 7)
      expect_true(nrow(tab) == 9)
  })
  where 23: eval(code, test_env)
  where 24: eval(code, test_env)
  where 25: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 29: doTryCatch(return(expr), name, parentenv, handler)
  where 30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 31: tryCatchList(expr, classes, parentenv, handlers)
  where 32: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 33: test_code(NULL, exprs, env)
  where 34: source_file(path, child_env(env), wrap = wrap)
  where 35: FUN(X[[i]], ...)
  where 36: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  where 37: doTryCatch(return(expr), name, parentenv, handler)
  where 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 39: tryCatchList(expr, classes, parentenv, handlers)
  where 40: tryCatch(code, testthat_abort_reporter = function(cnd) {
      cat(conditionMessage(cnd), "\n")
      NULL
  })
  where 41: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 
      env = env, wrap = wrap))
  where 42: test_files(test_dir = test_dir, test_package = test_package, 
      test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 
      env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package)
  where 43: test_files(test_dir = path, test_paths = test_paths, test_package = package, 
      reporter = reporter, load_helpers = load_helpers, env = env, 
      stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package, parallel = parallel)
  where 44: test_dir("testthat", package = package, reporter = reporter, 
      ..., load_package = "installed")
  where 45: test_check("atable")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (value, group, two_sample_htest.numeric = NULL, ...) 
  {
      if (is.function(two_sample_htest.numeric)) 
          return(two_sample_htest.numeric(value, group, ...))
      if (is.function(atable_options("two_sample_htest.numeric"))) 
          return(atable_options("two_sample_htest.numeric")(value, 
              group, ...))
      d <- data.frame(value = value, group = group)
      group_levels <- levels(group)
      x <- subset(d, group %in% group_levels[1], select = "value", 
          drop = TRUE)
      y <- subset(d, group %in% group_levels[2], select = "value", 
          drop = TRUE)
      test <- try(stats::ks.test(x, y, alternative = c("two.sided"), 
          ...), silent = TRUE)
      out <- if (class(test) == "try-error") {
          warning("Not enough values. Returning p.value=NaN.")
          test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
          test <- plyr::llply(test, function(x) NA)
          test$method <- "Two-sample Kolmogorov-Smirnov test"
          test$p.value <- NaN
          test$statistic <- NaN
          class(test) <- "htest"
          test
      }
      else {
          test
      }
      effect_size_test <- try(effsize::cohen.d(d = value, f = group, 
          na.rm = TRUE), silent = TRUE)
      effect_size <- if (class(effect_size_test) == "try-error") {
          warning("Not enough values. Returning effect size NaN.")
          list(estimate = NaN, conf.int = c(NaN, NaN))
      }
      else {
          effect_size_test
      }
      out$effect_size <- effect_size$estimate
      out$effect_size_CI_lower <- effect_size$conf.int[1]
      out$effect_size_CI_upper <- effect_size$conf.int[2]
      class(out) <- c("htest_with_effect_size", class(out))
      return(out)
  }
  <bytecode: 0xb614678>
  <environment: namespace:atable>
   --- function search by body ---
  Function two_sample_htest.numeric in namespace atable has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  atable
   --- call from context --- 
  two_sample_htest.numeric(value, group, ...)
   --- call from argument --- 
  if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }
   --- R stacktrace ---
  where 1: two_sample_htest.numeric(value, group, ...)
  where 2: two_sample_htest(value, group, ...)
  where 3: (function (DD, group_col, value_col, ...) 
  {
      stopifnot(is.character(group_col), length(group_col) == 1, 
          is.character(value_col), length(value_col) == 1, group_col %in% 
              colnames(DD), value_col %in% colnames(DD), is.factor(DD[[group_col]]))
      value <- DD[[value_col]]
      group <- DD[[group_col]]
      group_levels <- levels(DD[[group_col]])
      result <- if (length(group_levels) == 2) {
          two_sample_htest(value, group, ...)
      }
      else {
          multi_sample_htest(value, group, ...)
      }
      return(result)
  })(value_col = dots[[1L]][[1L]], DD = list(Numeric = c(-1.01759611982611, 
  -0.383283959886278, 0.872755411671399, 0.969545013970117, 0.383846665027094, 
  -1.85155566306746, -0.0539967368261657, 1.06477321433828, 0.813195037411605, 
  -0.190816474104282, -2.6999298085637, 0.0609666388011166, 0.573751697483578, 
  NA, 0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 
  0.470393399873943, -1.2426702705746, 1.38157545638553, 1.20445893700982, 
  0.824073963681881, -1.66262940218559, -0.569306343605481, 0.635513817289526, 
  0.0437220075778579, 0.348012303661307, 2.45959354887041, -0.818380324399669, 
  -2.11320011492914, 0.273695272430415, NA, 0.446041052961866, 
  -0.812384723790597, NA, -0.12370597157743, -0.477335506030052, 
  -0.166261491486608, 0.862563383626431, 0.0973404852028189, -1.62561673921129, 
  -0.0046207678264578, 0.760242167662055, 0.0389909128725626, 0.735072141614441, 
  -0.14647262699887, NA, 0.482369466104533, 0.992943636775734, 
  -1.24639549803204, -0.0334875248456097, -0.0709621812499963, 
  -0.758920653730951, -1.03435936093915, -0.630731953970819, 0.586807720012995, 
  -0.416322656183652, -0.78488780950532, 0.163416319486097, -1.23671423510935, 
  1.04587377623667, -0.484595416218709, 0.189128811680665, NA, 
  -0.000240668886441977, 1.80938204244287, -0.825327957109945, 
  1.14547045222799, 0.0315731875532431, -0.83520580530672, -0.0687636490165125, 
  0.746771687012467, -0.425518734394604, -0.772082235193457, 0.152764106747895, 
  0.988596845178799, -0.073458334672174, -1.38702655355974, -1.30667590437536, 
  -0.768395325077939, -0.527108125374458, -0.0214270650416246, 
  0.670498070996282, -0.434617038572407, -1.11387978331285, 0.6071059948785, 
  0.275456968739591, NA, -1.68248085947826, NA, 1.35336189394267, 
  0.724173800683369, -0.832552825764212, 0.732528486768414, -0.871926869997213, 
  -0.453397511229793, 1.18753427862908, -0.290145311790079, NA, 
  -0.291227708779169, NA, -0.848815696948922, -1.08851986195719, 
  -0.484290571117173, -0.336311209009573, NA, -0.243247228574846, 
  1.89220204160011, -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
  0.0885218957136163, 1.23915070840056, -1.64455553575371, 1.44635652537848, 
  -0.690560171665183, -0.276431085453852, -1.10941875989944, 0.133869316429452, 
  1.78533905173155, 2.42216335525159, -1.07682890211841, 0.485941110403099, 
  1.38852173874429, -0.195656817284544, -0.218174797706211, -0.304777954546445
  ), Factor = c(3L, NA, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 4L, 2L, 1L, 
  1L, 4L, 4L, 3L, 1L, 3L, 1L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1L, 2L, 2L, 1L
  ), Observations = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L)), group_col = "Group", format_statistics.statistics_factor = function (x, 
      ...) 
  {
      nn <- names(x)
      value <- unlist(x)
      total <- sum(value)
      percent <- 100 * value/total
      if (length(nn) <= 3) {
          value <- paste0(atable_options("format_percent")(percent[1]), 
              "% (", atable_options("format_numbers")(value[1]), 
              ")")
          format_statistics_out <- data.frame(tag = factor(nn[1], 
              levels = nn[1]), value = value[1], row.names = NULL, 
              stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
      else {
          value <- paste0(atable_options("format_percent")(percent), 
              "% (", atable_options("format_numbers")(value), ")")
          format_statistics_out <- data.frame(tag = factor(nn, 
              levels = nn), value = value, row.names = NULL, stringsAsFactors = FALSE, 
              check.names = FALSE, fix.empty.names = FALSE)
          return(format_statistics_out)
      }
  }, format_statistics.statistics_numeric = function (x, ...) 
  {
      the_mean <- atable_options("format_numbers")(x$mean)
      the_sd <- atable_options("format_numbers")(x$sd)
      values <- c(Mean_SD = paste0(the_mean, " (", the_sd, ")"))
      format_statistics_out <- data.frame(tag = factor("remove_me", 
          levels = "remove_me"), value = values, row.names = NULL, 
          stringsAsFactors = FALSE, check.names = FALSE, fix.empty.names = FALSE)
      return(format_statistics_out)
  })
  where 4: mapply(test_caller, value_col = target_cols, MoreArgs = list(DD = DD, 
      group_col = group_col, ...), SIMPLIFY = FALSE)
  where 5: apply_tests_helper(DD, target_cols, group_col, ...)
  where 6: atable_unsplitted_grouped(DD = DD, target_cols = target_cols, 
      group_col = group_col, Alias_mapping = Alias_mapping, split_cols = split_cols, 
      format_to = format_to, blocks = blocks, indent_character = indent_character, 
      indent = indent, ...)
  where 7: atable.data.frame(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 8: atable(x = x, target_cols = target_cols, group_col = group_col, 
      split_cols = NULL, indent = FALSE, blocks = blocks, indent_character = indent_character, 
      format_statistics.statistics_factor = format_factor, format_statistics.statistics_numeric = format_numeric, 
      ...)
  where 9: atable_compact.data.frame(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2", "Split1"), group_col = "Group", add_margins = TRUE, 
      blocks = list(Primary = "Numeric", Secondary = c("Factor", 
          "Split2")))
  where 10 at test_atable_compact.R#49: atable_compact(atable::test_data, target_cols = c("Numeric", 
      "Factor", "Split2", "Split1"), group_col = "Group", add_margins = TRUE, 
      blocks = list(Primary = "Numeric", Secondary = c("Factor", 
          "Split2")))
  where 11: eval(code, test_env)
  where 12: eval(code, test_env)
  where 13: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 19: tryCatchList(expr, classes, parentenv, handlers)
  where 20: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 21: test_code(desc, code, env = parent.frame(), reporter = reporter)
  where 22 at test_atable_compact.R#47: test_that("grouped margin blocks", {
      tab = atable_compact(atable::test_data, target_cols = c("Numeric", 
          "Factor", "Split2", "Split1"), group_col = "Group", add_margins = TRUE, 
          blocks = list(Primary = "Numeric", Secondary = c("Factor", 
              "Split2")))
      expect_true(is.data.frame(tab))
      expect_true(ncol(tab) == 7)
      expect_true(nrow(tab) == 16)
      expect_true(all(c("Primary", "Secondary") %in% tab[[1]]))
  })
  where 23: eval(code, test_env)
  where 24: eval(code, test_env)
  where 25: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 29: doTryCatch(return(expr), name, parentenv, handler)
  where 30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 31: tryCatchList(expr, classes, parentenv, handlers)
  where 32: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 33: test_code(NULL, exprs, env)
  where 34: source_file(path, child_env(env), wrap = wrap)
  where 35: FUN(X[[i]], ...)
  where 36: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  where 37: doTryCatch(return(expr), name, parentenv, handler)
  where 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 39: tryCatchList(expr, classes, parentenv, handlers)
  where 40: tryCatch(code, testthat_abort_reporter = function(cnd) {
      cat(conditionMessage(cnd), "\n")
      NULL
  })
  where 41: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 
      env = env, wrap = wrap))
  where 42: test_files(test_dir = test_dir, test_package = test_package, 
      test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 
      env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package)
  where 43: test_files(test_dir = path, test_paths = test_paths, test_package = package, 
      reporter = reporter, load_helpers = load_helpers, env = env, 
      stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package, parallel = parallel)
  where 44: test_dir("testthat", package = package, reporter = reporter, 
      ..., load_package = "installed")
  where 45: test_check("atable")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (value, group, two_sample_htest.numeric = NULL, ...) 
  {
      if (is.function(two_sample_htest.numeric)) 
          return(two_sample_htest.numeric(value, group, ...))
      if (is.function(atable_options("two_sample_htest.numeric"))) 
          return(atable_options("two_sample_htest.numeric")(value, 
              group, ...))
      d <- data.frame(value = value, group = group)
      group_levels <- levels(group)
      x <- subset(d, group %in% group_levels[1], select = "value", 
          drop = TRUE)
      y <- subset(d, group %in% group_levels[2], select = "value", 
          drop = TRUE)
      test <- try(stats::ks.test(x, y, alternative = c("two.sided"), 
          ...), silent = TRUE)
      out <- if (class(test) == "try-error") {
          warning("Not enough values. Returning p.value=NaN.")
          test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
          test <- plyr::llply(test, function(x) NA)
          test$method <- "Two-sample Kolmogorov-Smirnov test"
          test$p.value <- NaN
          test$statistic <- NaN
          class(test) <- "htest"
          test
      }
      else {
          test
      }
      effect_size_test <- try(effsize::cohen.d(d = value, f = group, 
          na.rm = TRUE), silent = TRUE)
      effect_size <- if (class(effect_size_test) == "try-error") {
          warning("Not enough values. Returning effect size NaN.")
          list(estimate = NaN, conf.int = c(NaN, NaN))
      }
      else {
          effect_size_test
      }
      out$effect_size <- effect_size$estimate
      out$effect_size_CI_lower <- effect_size$conf.int[1]
      out$effect_size_CI_upper <- effect_size$conf.int[2]
      class(out) <- c("htest_with_effect_size", class(out))
      return(out)
  }
  <bytecode: 0xb614678>
  <environment: namespace:atable>
   --- function search by body ---
  Function two_sample_htest.numeric in namespace atable has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  atable
   --- call from context --- 
  two_sample_htest.numeric(value, group, ...)
   --- call from argument --- 
  if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }
   --- R stacktrace ---
  where 1: two_sample_htest.numeric(value, group, ...)
  where 2: two_sample_htest(value, group, ...)
  where 3: (function (DD, group_col, value_col, ...) 
  {
      stopifnot(is.character(group_col), length(group_col) == 1, 
          is.character(value_col), length(value_col) == 1, group_col %in% 
              colnames(DD), value_col %in% colnames(DD), is.factor(DD[[group_col]]))
      value <- DD[[value_col]]
      group <- DD[[group_col]]
      group_levels <- levels(DD[[group_col]])
      result <- if (length(group_levels) == 2) {
          two_sample_htest(value, group, ...)
      }
      else {
          multi_sample_htest(value, group, ...)
      }
      return(result)
  })(value_col = dots[[1L]][[1L]], DD = list(Numeric = c(-1.01759611982611, 
  -0.383283959886278, 0.872755411671399, 0.969545013970117, 0.383846665027094, 
  -1.85155566306746, -0.0539967368261657, 1.06477321433828, 0.813195037411605, 
  -0.190816474104282, -2.6999298085637, 0.0609666388011166, 0.573751697483578, 
  NA, 0.157412540175875, 0.431565372868771, NA, 1.30997822575155, 
  0.470393399873943, -1.2426702705746, 1.38157545638553, 1.20445893700982, 
  0.824073963681881, -1.66262940218559, -0.569306343605481, 0.635513817289526, 
  0.0437220075778579, 0.348012303661307, 2.45959354887041, -0.818380324399669, 
  -2.11320011492914, 0.273695272430415, NA, 0.446041052961866, 
  -0.812384723790597, NA, -0.12370597157743, -0.477335506030052, 
  -0.166261491486608, 0.862563383626431, 0.0973404852028189, -1.62561673921129, 
  -0.0046207678264578, 0.760242167662055, 0.0389909128725626, 0.735072141614441, 
  -0.14647262699887, NA, 0.482369466104533, 0.992943636775734, 
  -1.24639549803204, -0.0334875248456097, -0.0709621812499963, 
  -0.758920653730951, -1.03435936093915, -0.630731953970819, 0.586807720012995, 
  -0.416322656183652, -0.78488780950532, 0.163416319486097, -1.23671423510935, 
  1.04587377623667, -0.484595416218709, 0.189128811680665, NA, 
  -0.000240668886441977, 1.80938204244287, -0.825327957109945, 
  1.14547045222799, 0.0315731875532431, -0.83520580530672, -0.0687636490165125, 
  0.746771687012467, -0.425518734394604, -0.772082235193457, 0.152764106747895, 
  0.988596845178799, -0.073458334672174, -1.38702655355974, -1.30667590437536, 
  -0.768395325077939, -0.527108125374458, -0.0214270650416246, 
  0.670498070996282, -0.434617038572407, -1.11387978331285, 0.6071059948785, 
  0.275456968739591, NA, -1.68248085947826, NA, 1.35336189394267, 
  0.724173800683369, -0.832552825764212, 0.732528486768414, -0.871926869997213, 
  -0.453397511229793, 1.18753427862908, -0.290145311790079, NA, 
  -0.291227708779169, NA, -0.848815696948922, -1.08851986195719, 
  -0.484290571117173, -0.336311209009573, NA, -0.243247228574846, 
  1.89220204160011, -1.38599833728542, NA, 0.349081528106831, 1.62844226581541, 
  0.0885218957136163, 1.23915070840056, -1.64455553575371, 1.44635652537848, 
  -0.690560171665183, -0.276431085453852, -1.10941875989944, 0.133869316429452, 
  1.78533905173155, 2.42216335525159, -1.07682890211841, 0.485941110403099, 
  1.38852173874429, -0.195656817284544, -0.218174797706211, -0.304777954546445
  ), Group = c(2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 
  1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 
  1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
  1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 
  2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 
  2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 
  1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 
  2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 
  1L, 1L, 2L, 2L, 1L), Observations = c(0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
  0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)), group_col = "Group", 
      statistics.numeric = function(x, ...){list(stats_numeric = 1,
                                                          local_call = new_value_numeric)})
  where 4: mapply(test_caller, value_col = target_cols, MoreArgs = list(DD = DD, 
      group_col = group_col, ...), SIMPLIFY = FALSE)
  where 5: apply_tests_helper(DD, target_cols, group_col, ...)
  where 6: atable_unsplitted_grouped(DD = DD, target_cols = target_cols, 
      group_col = group_col, Alias_mapping = Alias_mapping, split_cols = split_cols, 
      format_to = format_to, blocks = blocks, indent_character = indent_character, 
      indent = indent, ...)
  where 7: atable.data.frame(atable::test_data, target_cols = "Numeric", 
      group_col = "Group", statistics.numeric = statistics_numeric_local)
  where 8 at test_modify_atable.R#56: atable(atable::test_data, target_cols = "Numeric", group_col = "Group", 
      statistics.numeric = statistics_numeric_local)
  where 9: eval(code, test_env)
  where 10: eval(code, test_env)
  where 11: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 14: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 15: doTryCatch(return(expr), name, parentenv, handler)
  where 16: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 17: tryCatchList(expr, classes, parentenv, handlers)
  where 18: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 19: test_code(desc, code, env = parent.frame(), reporter = reporter)
  where 20 at test_modify_atable.R#9: test_that("statistics applies modified function", {
      tab = atable(DD, target_cols = "Numeric")
      expect_equal(tab$value[5], "117 (12)")
      new_value_numeric = "local numeric"
      statistics_numeric_local = function(x, ...) {
          list(stats_numeric = 1, local_call = new_value_numeric)
      }
      tab = atable(atable::test_data, target_cols = "Numeric", 
          statistics.numeric = statistics_numeric_local)
      expect_equal(tab$value[5], new_value_numeric)
      statistics_numeric_global_option = function(x, ...) {
          list(atable_options_numeric = 1, option = "global option numeric")
      }
      atable_options(statistics.numeric = statistics_numeric_global_option)
      tab = atable(atable::test_data, target_cols = "Numeric")
      expect_equal(tab$value[5], "global option numeric")
      tab = atable(atable::test_data, target_cols = "Numeric", 
          statistics.numeric = statistics_numeric_local)
      expect_equal(tab$value[5], new_value_numeric)
      expect_equal(class(atable_options("statistics.numeric")), 
          "function")
      atable_options_reset()
      tab = atable(DD, target_cols = "Numeric")
      expect_equal(tab$value[5], "117 (12)")
      tab = atable(atable::test_data, target_cols = "Numeric", 
          split_cols = "Split1", statistics.numeric = statistics_numeric_local)
      expect_equal(tab$value[18], new_value_numeric)
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group", statistics.numeric = statistics_numeric_local)
      expect_equal(tab$Control[5], new_value_numeric)
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group", split_cols = "Split1", statistics.numeric = statistics_numeric_local)
      expect_equal(tab$Treatment[18], new_value_numeric)
      expect_equal(tab$Control[12], new_value_numeric)
      statistics_factor_local = function(x, ...) {
          list(stats_Factor = 1, local_call = "local factor")
      }
      tab = atable(atable::test_data, target_cols = "Factor", statistics.factor = statistics_factor_local)
      expect_equal(tab$value[5], "local factor")
      statistics_factor_global_option = function(x, ...) {
          list(atable_options_factor = 1, option = "global option factor")
      }
      atable_options(statistics.factor = statistics_factor_global_option)
      tab = atable(atable::test_data, target_cols = "Factor")
      atable_options_reset()
      expect_equal(tab$value[5], "global option factor")
      statistics_ordered_local = function(x, ...) {
          list(stats_ordered = 1, local_call = "local ordered")
      }
      tab = atable(atable::test_data, target_cols = "Ordered", 
          statistics.ordered = statistics_ordered_local)
      expect_equal(tab$value[5], "local ordered")
      statistics_ordered_global_option = function(x, ...) {
          list(atable_options_ordered = 1, option = "global option ordered")
      }
      atable_options(statistics.ordered = statistics_ordered_global_option)
      tab = atable(atable::test_data, target_cols = "Ordered")
      atable_options_reset()
      expect_equal(tab$value[5], "global option ordered")
      two_sample_htest_factor_local = function(value, group, ...) {
          list(two_sample_htest_factor_local = "1", local = "two sample htest factor local")
      }
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group", 
          two_sample_htest.factor = two_sample_htest_factor_local)
      expect_equal(tab$local[4], "two sample htest factor local")
      two_sample_htest_factor_global = function(value, group, ...) {
          list(two_sample_htest_factor_global = "2", global = "two sample htest factor global")
      }
      atable_options(two_sample_htest.factor = two_sample_htest_factor_global)
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group")
      expect_equal(tab$global[4], "two sample htest factor global")
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group", 
          split_cols = "Split2")
      atable_options_reset()
      expect_equal(tab$global[14], "two sample htest factor global")
      new_two_sample_htest_numeric <- function(value, group, ...) {
          d <- data.frame(value = value, group = group)
          group_levels <- levels(group)
          x <- subset(d, group %in% group_levels[1], select = "value", 
              drop = TRUE)
          y <- subset(d, group %in% group_levels[2], select = "value", 
              drop = TRUE)
          ks_test_out <- stats::ks.test(x, y)
          t_test_out <- stats::t.test(x, y)
          out <- list(p_ks = ks_test_out$p.value, p_t = t_test_out$p.value)
          return(out)
      }
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group", two_sample_htest.numeric = new_two_sample_htest_numeric)
      expect_equal(colnames(tab)[4], "p\\_ks")
      expect_equal(tab[4, "p\\_ks"], "0.36")
      two_sample_htest_ordered_local = function(value, group, ...) {
          list(two_sample_htest_ordered_local = "1", local = "two sample htest ordered local")
      }
      tab = atable(atable::test_data, target_cols = "Ordered", 
          group_col = "Group", two_sample_htest.ordered = two_sample_htest_ordered_local)
      expect_equal(tab$local[4], "two sample htest ordered local")
      two_sample_htest_ordered_global = function(value, group, 
          ...) {
          list(two_sample_htest_ordered_global = "2", local = "two sample htest ordered global")
      }
      atable_options(two_sample_htest.ordered = two_sample_htest_ordered_global)
      tab = atable(atable::test_data, target_cols = "Ordered", 
          group_col = "Group")
      atable_options_reset()
      expect_equal(tab$local[4], "two sample htest ordered global")
      multi_sample_htest_numeric_local = function(value, group, 
          ...) {
          list(multi_sample_htest_numeric_local = "1", local = "multi sample htest numeric local")
      }
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group2", multi_sample_htest.numeric = multi_sample_htest_numeric_local)
      expect_equal(tab$local[4], "multi sample htest numeric local")
      multi_sample_htest_numeric_global = function(value, group, 
          ...) {
          list(multi_sample_htest_numeric_global = "1", global = "multi sample htest numeric global")
      }
      atable_options(multi_sample_htest.ordered = multi_sample_htest_numeric_global)
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group2")
      atable_options_reset()
      expect_equal(tab$global[4], "multi sample htest numeric global")
      multi_sample_htest_factor_local = function(value, group, 
          ...) {
          list(multi_sample_htest_numeric_local = "1", local = "multi sample htest factor local")
      }
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2", 
          multi_sample_htest.factor = multi_sample_htest_factor_local)
      expect_equal(tab$local[4], "multi sample htest factor local")
      multi_sample_htest_factor_global = function(value, group, 
          ...) {
          list(multi_sample_htest_factor_global = "1", global = "multi sample htest factor global")
      }
      atable_options(multi_sample_htest.factor = multi_sample_htest_factor_global)
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2")
      atable_options_reset()
      expect_equal(tab$global[4], "multi sample htest factor global")
      multi_sample_htest_ordered_local = function(value, group, 
          ...) {
          list(multi_sample_htest_ordered_local = "1", local = "multi sample htest ordered local")
      }
      tab = atable(atable::test_data, target_cols = "Ordered", 
          group_col = "Group2", multi_sample_htest.ordered = multi_sample_htest_ordered_local)
      expect_equal(tab$local[4], "multi sample htest ordered local")
      multi_sample_htest_ordered_global = function(value, group, 
          ...) {
          list(multi_sample_htest_ordered_global = "1", global = "multi sample htest ordered global")
      }
      atable_options(multi_sample_htest.ordered = multi_sample_htest_ordered_global)
      tab = atable(atable::test_data, target_cols = "Ordered", 
          group_col = "Group2")
      atable_options_reset()
      expect_equal(tab$global[4], "multi sample htest ordered global")
      format_statistics_numeric_local = function(x, ...) {
          SD_Mean = paste(round(c(x$sd, x$mean), digits = 1), collapse = "; ")
          out <- data.frame(tag = factor("SD; Mean local"), value = paste0(SD_Mean, 
              " local"), stringsAsFactors = FALSE)
          return(out)
      }
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group2", format_statistics.statistics_numeric = format_statistics_numeric_local)
      expect_equal(tab$Group1[4], "1; 0.2 local")
      format_statistics_numeric_global = function(x, ...) {
          SD_Mean = paste(round(c(x$sd, x$mean), digits = 1), collapse = "; ")
          out <- data.frame(tag = factor("SD; Mean global"), value = paste0(SD_Mean, 
              " global"), stringsAsFactors = FALSE)
          return(out)
      }
      atable_options(format_statistics.statistics_numeric = format_statistics_numeric_global)
      tab = atable(atable::test_data, target_cols = "Numeric", 
          group_col = "Group2")
      atable_options_reset()
      expect_equal(tab$Group1[4], "1; 0.2 global")
      format_statistics_factor_local = function(x, ...) {
          out <- data.frame(tag = factor("format factor local"), 
              value = "format factor local", stringsAsFactors = FALSE)
          return(out)
      }
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2", 
          format_statistics.statistics_factor = format_statistics_factor_local)
      expect_equal(tab$Group1[4], "format factor local")
      format_statistics_factor_global = function(x, ...) {
          out <- data.frame(tag = factor("format factor global"), 
              value = "format factor global", stringsAsFactors = FALSE)
          return(out)
      }
      atable_options(format_statistics.statistics_factor = format_statistics_factor_global)
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2")
      atable_options_reset()
      expect_equal(tab$Group1[4], "format factor global")
      format_tests_htest_local = function(x, ...) {
          return(data.frame(local = "format htest local"))
      }
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2", 
          split_cols = "Split1", format_tests.htest = format_tests_htest_local)
      expect_equal(tab$local[23], "format htest local")
      format_tests_htest_global = function(x, ...) {
          return(data.frame(local = "format htest global"))
      }
      atable_options(format_tests.htest = format_tests_htest_global)
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group2", 
          split_cols = "Split1")
      expect_equal(tab$local[23], "format htest global")
      atable_options_reset()
      format_tests_htest_with_effect_size_local = function(x, ...) {
          return(data.frame(local = "format htest effsize local"))
      }
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group", 
          split_cols = "Split1", format_tests.htest_with_effect_size = format_tests_htest_with_effect_size_local)
      expect_equal(tab$local[23], "format htest effsize local")
      format_tests_htest_with_effect_size_global = function(x, 
          ...) {
          return(data.frame(local = "format htest effsize global"))
      }
      atable_options(format_tests.htest_with_effect_size = format_tests_htest_with_effect_size_global)
      tab = atable(atable::test_data, target_cols = "Factor", group_col = "Group", 
          split_cols = "Split1")
      expect_equal(tab$local[23], "format htest effsize global")
      atable_options_reset()
  })
  where 21: eval(code, test_env)
  where 22: eval(code, test_env)
  where 23: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 26: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 27: doTryCatch(return(expr), name, parentenv, handler)
  where 28: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 29: tryCatchList(expr, classes, parentenv, handlers)
  where 30: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 31: test_code(NULL, exprs, env)
  where 32: source_file(path, child_env(env), wrap = wrap)
  where 33: FUN(X[[i]], ...)
  where 34: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, classes, parentenv, handlers)
  where 38: tryCatch(code, testthat_abort_reporter = function(cnd) {
      cat(conditionMessage(cnd), "\n")
      NULL
  })
  where 39: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 
      env = env, wrap = wrap))
  where 40: test_files(test_dir = test_dir, test_package = test_package, 
      test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 
      env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package)
  where 41: test_files(test_dir = path, test_paths = test_paths, test_package = package, 
      reporter = reporter, load_helpers = load_helpers, env = env, 
      stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap, load_package = load_package, parallel = parallel)
  where 42: test_dir("testthat", package = package, reporter = reporter, 
      ..., load_package = "installed")
  where 43: test_check("atable")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (value, group, two_sample_htest.numeric = NULL, ...) 
  {
      if (is.function(two_sample_htest.numeric)) 
          return(two_sample_htest.numeric(value, group, ...))
      if (is.function(atable_options("two_sample_htest.numeric"))) 
          return(atable_options("two_sample_htest.numeric")(value, 
              group, ...))
      d <- data.frame(value = value, group = group)
      group_levels <- levels(group)
      x <- subset(d, group %in% group_levels[1], select = "value", 
          drop = TRUE)
      y <- subset(d, group %in% group_levels[2], select = "value", 
          drop = TRUE)
      test <- try(stats::ks.test(x, y, alternative = c("two.sided"), 
          ...), silent = TRUE)
      out <- if (class(test) == "try-error") {
          warning("Not enough values. Returning p.value=NaN.")
          test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
          test <- plyr::llply(test, function(x) NA)
          test$method <- "Two-sample Kolmogorov-Smirnov test"
          test$p.value <- NaN
          test$statistic <- NaN
          class(test) <- "htest"
          test
      }
      else {
          test
      }
      effect_size_test <- try(effsize::cohen.d(d = value, f = group, 
          na.rm = TRUE), silent = TRUE)
      effect_size <- if (class(effect_size_test) == "try-error") {
          warning("Not enough values. Returning effect size NaN.")
          list(estimate = NaN, conf.int = c(NaN, NaN))
      }
      else {
          effect_size_test
      }
      out$effect_size <- effect_size$estimate
      out$effect_size_CI_lower <- effect_size$conf.int[1]
      out$effect_size_CI_upper <- effect_size$conf.int[2]
      class(out) <- c("htest_with_effect_size", class(out))
      return(out)
  }
  <bytecode: 0xb614678>
  <environment: namespace:atable>
   --- function search by body ---
  Function two_sample_htest.numeric in namespace atable has this body.
   ----------- END OF FAILURE REPORT -------------- 
  [ FAIL 5 | WARN 22 | SKIP 0 | PASS 83 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_atable.R:129:1): (code run outside of `test_that()`) ────────────
  Error in `if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }`: the condition has length > 1
  Backtrace:
       ▆
    1. └─base::lapply(the_arg_list, do.call, what = "atable") at test_atable.R:129:0
    2.   ├─base FUN(X[[i]], ...)
    3.   ├─atable::atable(...)
    4.   └─atable:::atable.data.frame(...)
    5.     └─atable:::atable_splitted_grouped(...)
    6.       └─atable:::apply_tests(...)
    7.         └─plyr::ldply(...)
    8.           └─plyr::llply(...)
    9.             ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
   10.             └─base::lapply(pieces, .fun, ...)
   11.               └─atable FUN(X[[i]], ...)
   12.                 └─base::mapply(...)
   13.                   └─atable `<fn>`(value_col = dots[[1L]][[2L]], DD = `<df[,9]>`, group_col = "Group")
   14.                     ├─atable::two_sample_htest(value, group, ...)
   15.                     └─atable:::two_sample_htest.numeric(value, group, ...)
  ── Error (test_atable_compact.R:27:3): grouped ─────────────────────────────────
  Error in `if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }`: the condition has length > 1
  Backtrace:
       ▆
    1. ├─atable::atable_compact(...) at test_atable_compact.R:27:2
    2. └─atable:::atable_compact.data.frame(...)
    3.   ├─atable::atable(...)
    4.   └─atable:::atable.data.frame(...)
    5.     └─atable:::atable_unsplitted_grouped(...)
    6.       └─atable:::apply_tests_helper(DD, target_cols, group_col, ...)
    7.         └─base::mapply(...)
    8.           └─atable `<fn>`(...)
    9.             ├─atable::two_sample_htest(value, group, ...)
   10.             └─atable:::two_sample_htest.numeric(value, group, ...)
  ── Error (test_atable_compact.R:37:3): grouped margins ─────────────────────────
  Error in `if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }`: the condition has length > 1
  Backtrace:
       ▆
    1. ├─atable::atable_compact(...) at test_atable_compact.R:37:2
    2. └─atable:::atable_compact.data.frame(...)
    3.   ├─atable::atable(...)
    4.   └─atable:::atable.data.frame(...)
    5.     └─atable:::atable_unsplitted_grouped(...)
    6.       └─atable:::apply_tests_helper(DD, target_cols, group_col, ...)
    7.         └─base::mapply(...)
    8.           └─atable `<fn>`(...)
    9.             ├─atable::two_sample_htest(value, group, ...)
   10.             └─atable:::two_sample_htest.numeric(value, group, ...)
  ── Error (test_atable_compact.R:49:3): grouped margin blocks ───────────────────
  Error in `if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }`: the condition has length > 1
  Backtrace:
       ▆
    1. ├─atable::atable_compact(...) at test_atable_compact.R:49:2
    2. └─atable:::atable_compact.data.frame(...)
    3.   ├─atable::atable(...)
    4.   └─atable:::atable.data.frame(...)
    5.     └─atable:::atable_unsplitted_grouped(...)
    6.       └─atable:::apply_tests_helper(DD, target_cols, group_col, ...)
    7.         └─base::mapply(...)
    8.           └─atable `<fn>`(...)
    9.             ├─atable::two_sample_htest(value, group, ...)
   10.             └─atable:::two_sample_htest.numeric(value, group, ...)
  ── Error (test_modify_atable.R:56:3): statistics applies modified function ─────
  Error in `if (class(test) == "try-error") {
      warning("Not enough values. Returning p.value=NaN.")
      test <- stats::ks.test(c(1, 2), c(3, 4, 5), alternative = c("two.sided"))
      test <- plyr::llply(test, function(x) NA)
      test$method <- "Two-sample Kolmogorov-Smirnov test"
      test$p.value <- NaN
      test$statistic <- NaN
      class(test) <- "htest"
      test
  } else {
      test
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─atable::atable(...) at test_modify_atable.R:56:2
   2. └─atable:::atable.data.frame(...)
   3.   └─atable:::atable_unsplitted_grouped(...)
   4.     └─atable:::apply_tests_helper(DD, target_cols, group_col, ...)
   5.       └─base::mapply(...)
   6.         └─atable `<fn>`(...)
   7.           ├─atable::two_sample_htest(value, group, ...)
   8.           └─atable:::two_sample_htest.numeric(value, group, ...)
  
  [ FAIL 5 | WARN 22 | SKIP 0 | PASS 83 ]
  Error: Test failures
  Execution halted