Running ‘testthat.R’ [4s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pccc)
  > 
  > test_check("pccc")
  ── 1. Error: 1 patient with no diagnosis data - should have all CCCs as FALSE (@
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code) == 0)) at testthat/test_ccc.R:90
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 2. Error: 1 patient with multiple rows of no diagnosis data - should have all
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code) == 0)) at testthat/test_ccc.R:98
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 3. Error: 1 patient with no procedure data - should have all CCCs as FALSE (@
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), 
         icdv = code) == 0)) at testthat/test_ccc.R:107
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 4. Error: Column names returned from ccc are as expected (@test_ccc.R#115)  ─
  argument "first" is missing, with no default
  1: expect_equal(c("neuromusc", "cvd", "respiratory", "renal", "gi", "hemato_immu", "metabolic", 
         "congeni_genetic", "malignancy", "neonatal", "tech_dep", "transplant", "ccc_flag"), 
         colnames(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
             icdv = code))) at testthat/test_ccc.R:115
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: colnames(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code))
  5: is.data.frame(x)
  6: ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), icdv = code)
  7: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  8: dplyr::select(data, !(!dplyr::enquo(id)))
  9: select.data.frame(data, !(!dplyr::enquo(id)))
  10: select_vars(names(.data), !(!(!quos(...))))
  11: is_negated(first)
  12: is_lang(x, "-", n = 1)
  13: is_call(x, name, n, ns)
  
  ── 5. Error: 1 patient with no diagnosis data - should have all CCCs as FALSE (@
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code) == 0)) at testthat/test_ccc.R:90
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 6. Error: 1 patient with multiple rows of no diagnosis data - should have all
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code) == 0)) at testthat/test_ccc.R:98
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA, dx2 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 7. Error: 1 patient with no procedure data - should have all CCCs as FALSE (@
  argument "first" is missing, with no default
  1: expect_true(all(ccc(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), 
         icdv = code) == 0)) at testthat/test_ccc.R:107
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ccc(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), icdv = code)
  5: ccc.data.frame(dplyr::data_frame(id = "a", pc1 = NA), dx_cols = dplyr::starts_with("pc"), 
         icdv = code)
  6: dplyr::select(data, !(!dplyr::enquo(id)))
  7: select.data.frame(data, !(!dplyr::enquo(id)))
  8: select_vars(names(.data), !(!(!quos(...))))
  9: is_negated(first)
  10: is_lang(x, "-", n = 1)
  11: is_call(x, name, n, ns)
  
  ── 8. Error: Column names returned from ccc are as expected (@test_ccc.R#115)  ─
  argument "first" is missing, with no default
  1: expect_equal(c("neuromusc", "cvd", "respiratory", "renal", "gi", "hemato_immu", "metabolic", 
         "congeni_genetic", "malignancy", "neonatal", "tech_dep", "transplant", "ccc_flag"), 
         colnames(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
             icdv = code))) at testthat/test_ccc.R:115
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: colnames(ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code))
  5: is.data.frame(x)
  6: ccc(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), icdv = code)
  7: ccc.data.frame(dplyr::data_frame(id = "a", dx1 = NA), dx_cols = dplyr::starts_with("dx"), 
         icdv = code)
  8: dplyr::select(data, !(!dplyr::enquo(id)))
  9: select.data.frame(data, !(!dplyr::enquo(id)))
  10: select_vars(names(.data), !(!(!quos(...))))
  11: is_negated(first)
  12: is_lang(x, "-", n = 1)
  13: is_call(x, name, n, ns)
  
  ── 9. Error: icd 9 data set with missing id parameter (@test_ccc_icd9.R#74)  ───
  argument "first" is missing, with no default
  1: expect_true(dplyr::all_equal(ccc(pccc::pccc_icd9_dataset[, c(1:21)], dx_cols = dplyr::starts_with("dx"), 
         pc_cols = dplyr::starts_with("pc"), icdv = 9), test_helper(icd9_test_result) %>% 
         dplyr::select(-id))) at testthat/test_ccc_icd9.R:74
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: dplyr::all_equal(ccc(pccc::pccc_icd9_dataset[, c(1:21)], dx_cols = dplyr::starts_with("dx"), 
         pc_cols = dplyr::starts_with("pc"), icdv = 9), test_helper(icd9_test_result) %>% 
         dplyr::select(-id))
  5: equal_data_frame(target, current, ignore_col_order = ignore_col_order, ignore_row_order = ignore_row_order, 
         convert = convert)
  6: ccc(pccc::pccc_icd9_dataset[, c(1:21)], dx_cols = dplyr::starts_with("dx"), pc_cols = dplyr::starts_with("pc"), 
         icdv = 9)
  7: ccc.data.frame(pccc::pccc_icd9_dataset[, c(1:21)], dx_cols = dplyr::starts_with("dx"), 
         pc_cols = dplyr::starts_with("pc"), icdv = 9)
  8: dplyr::select(data, !(!dplyr::enquo(id)))
  9: select.data.frame(data, !(!dplyr::enquo(id)))
  10: select_vars(names(.data), !(!(!quos(...))))
  11: is_negated(first)
  12: is_lang(x, "-", n = 1)
  13: is_call(x, name, n, ns)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 107 SKIPPED: 2 FAILED: 9
  1. Error: 1 patient with no diagnosis data - should have all CCCs as FALSE (@test_ccc.R#90) 
  2. Error: 1 patient with multiple rows of no diagnosis data - should have all CCCs as FALSE (@test_ccc.R#98) 
  3. Error: 1 patient with no procedure data - should have all CCCs as FALSE (@test_ccc.R#107) 
  4. Error: Column names returned from ccc are as expected (@test_ccc.R#115) 
  5. Error: 1 patient with no diagnosis data - should have all CCCs as FALSE (@test_ccc.R#90) 
  6. Error: 1 patient with multiple rows of no diagnosis data - should have all CCCs as FALSE (@test_ccc.R#98) 
  7. Error: 1 patient with no procedure data - should have all CCCs as FALSE (@test_ccc.R#107) 
  8. Error: Column names returned from ccc are as expected (@test_ccc.R#115) 
  9. Error: icd 9 data set with missing id parameter (@test_ccc_icd9.R#74) 
  
  Error: testthat unit tests failed
  Execution halted