Running 'test-asserts.R' [16s]
  Running 'test-charlson.R' [27s]
  Running 'test-comorbidities.R' [5s]
  Running 'test-data-frame-tools.R' [5s]
  Running 'test-elixhauser-example.R' [4s]
  Running 'test-elixhauser-poa-na.R' [5s]
  Running 'test-elixhauser.R' [3s]
  Running 'test-icd_compact_to_full.R' [4s]
  Running 'test-internal-data.R' [18s]
  Running 'test-is_icd.R' [20s]
  Running 'test-locked-bindings.R' [8s]
  Running 'test-longitudinal-comorbidities.R' [12s]
  Running 'test-longitudinal-pccc-v3.1.R' [5s]
  Running 'test-lookup_icd_codes.R' [7s]
  Running 'test-pccc-deltas.R' [15s]
  Running 'test-pccc.R' [19s]
  Running 'test-poa-in-cumulative.R' [4s]
  Running 'test-primarydx.R' [4s]
  Running 'test-summary-charlson.R' [7s]
  Running 'test-summary-elixhauser.R' [6s]
  Running 'test-summary-pccc-subconditions.R' [7s]
  Running 'test-summary-pccc.R' [11s]
  Running 'test-tibble-datatable.R' [12s]
  Running 'test-vs-ahrq.R' [6s]
  Running 'test-vs-pccc_1.0.7.R' [9s]
  Running 'test-zero-row-inputs.R' [5s]
  Running 'utilities.R' [0s]
Running the tests in 'tests/test-summary-charlson.R' failed.
Complete output:
  > source('utilities.R')
  > ################################################################################
  > # Tests for summarizing Charlson comorbidities
  > library(medicalcoder)
  > 
  > ################################################################################
  > # Prepare input with an age variable to exercise age scoring logic
  > mdcr$age <- as.integer(substr(as.character(mdcr$patid), 1, 2))
  > 
  > charlson <- comorbidities(
  +   data       = mdcr,
  +   id.vars    = "patid",
  +   icdv.var   = "icdv",
  +   icd.codes  = "code",
  +   dx.var     = "dx",
  +   method     = "charlson_quan2011",
  +   flag.method = "current",
  +   poa        = 1L,
  +   primarydx  = 0L,
  +   age.var    = "age"
  + )
  > 
  > summary_current <- summary(charlson)
  Error in as.data.frame.integer(x[[i]], optional = TRUE) : 
    row names contain missing values
  Calls: summary ... data.frame -> as.data.frame -> as.data.frame.integer
  Execution halted