Running examples in ‘healthcareai-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: add_best_levels
> ### Title: Build efficient features from high-cardinality,
> ###   multiple-membership factors
> ### Aliases: add_best_levels get_best_levels
> 
> ### ** Examples
> 
> set.seed(45796)
> 
> # We have two tables we want to use in our models:
> # - df is the model table. It has the outcomes (survived), and we want one
> #   prediction for each row in df
> # - meds has detailed information on each row (patient) in df. Each patient
> #   may have zero, one, or more observations (drugs) in meds, and meds may
> #   have associated values (doses).
> 
> df <- tibble::tibble(
+   patient = paste0("Z", sample(10, 5)),
+   age = sample(20:80, 5),
+   survived = sample(c("N", "Y"), 5, replace = TRUE, prob = c(1, 2))
+ )
> 
> meds <- tibble::tibble(
+   patient = sample(df$patient, 10, replace = TRUE),
+   drug = sample(c("Quinapril", "Vancomycin", "Ibuprofen",
+                   "Paclitaxel", "Epinephrine", "Dexamethasone"),
+                 10, replace = TRUE),
+   dose = sample(c(100, 250), 10, replace = TRUE)
+ )
> 
> # Identify three drugs likely to be good predictors of survival
> 
> get_best_levels(d = df,
+                 longsheet = meds,
+                 id = patient,
+                 groups = drug,
+                 outcome = survived,
+                 n_levels = 3)
Error: Problem with `filter()` input `..1`.
✖ object 'patient' not found
ℹ Input `..1` is `n_distinct(patient) >= min_obs`.
ℹ The error occured in group 1: drug = "Dexamethasone".
Backtrace:
     █
  1. └─healthcareai::get_best_levels(...)
  2.   └─`%>%`(...)
  3.     ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4.     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  5.       └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  6.         └─healthcareai:::`_fseq`(`_lhs`)
  7.           └─magrittr::freduce(value, `_function_list`)
  8.             └─function_list[[i]](value)
  9.               ├─dplyr::filter(., n_distinct(!!id) >= min_obs)
 10.               └─dplyr:::filter.data.frame(., n_distinct(!!id) >= min_obs)
 11.                 └─dplyr:::filter_rows(.data, ...)
 12.                   └─base::tryCatch(...)
 13.                     └─base:::tryCatchList(expr, classes, parentenv, handlers)
 14.            
Execution halted