Running examples in 'aba-Ex.R' failed
The error most likely occurred in:

> ### Name: aba_longpower
> ### Title: Run power analysis on a longitudinal-based aba model.
> ### Aliases: aba_longpower
> 
> ### ** Examples
> 
> 
> # use only two year follow-up data; filter by some basic AD trial criteria
> data <- adnimerge %>%
+   dplyr::filter(
+     VISCODE %in% c('bl', 'm06', 'm12', 'm24'),
+     DX_bl %in% c('MCI','AD'),
+     CDR_bl %in% c(0.5, 1),
+     MMSE_bl >= 20, MMSE_bl <= 28
+   )
> 
> # fit an aba model with an lme stat to get a longitudinal model
> model <- data %>% aba_model() %>%
+   set_outcomes(CDRSB, ADAS13) %>%
+   set_covariates(AGE, GENDER, EDUCATION) %>%
+   set_stats(stat_lme(id = 'RID', time = 'YEARS_bl')) %>%
+   fit()
> 
> # summarize aba model - not necessary here but good to see results
> model_summary <- model %>% summary()
> 
> # run power analysis on the fitted aba model with various assumptions
> # e.g., treatment effect between 25 - 35%; power between 80 - 90%
> pwr <- model %>%
+   aba_longpower(
+     n = NULL,
+     pct_change = c(0.25, 0.30, 0.35),
+     power = c(0.8, 0.85, 0.9),
+     t_length = 2,
+     t_freq = 0.25,
+     dropout = 0.2
+   )
Error: Problem with `mutate()` column `power_fit`.
ℹ `power_fit = list(calculate_power(.data$fit, param_df))`.
✖ Problem with `mutate()` column `n`.
ℹ `n = calculate_power_individual(...)`.
✖ there is no package called 'longpower'
ℹ The error occurred in row 1.
ℹ The error occurred in row 1.
Backtrace:
     █
  1. ├─`%>%`(...)
  2. ├─aba::aba_longpower(...)
  3. │ └─`%>%`(...)
  4. ├─dplyr::mutate(...)
  5. ├─dplyr:::mutate.data.frame(...)
  6. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
  7. │   ├─base::withCallingHandlers(...)
  8. │   └─mask$eval_all_mutate(quo)
  9. ├─aba:::calculate_power(.data$fit, param_df)
 10. │ └─`%>%`(...)
 11. ├─dplyr::ungroup(.)
 12. ├─dplyr::mutate(...)
 13. ├─dplyr:::mutate.data.frame(...)
 14. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
 15. │   ├─base::withCallingHandlers(...)
 16. │   └─mask$eval_all_mutate(quo)
 17. ├─aba:::calculate_power_individual(...)
 18. ├─base::loadNamespace(x)
 19. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
 20. │ │ └─base:::withOneRestart(expr, restarts[[1L]])
 21. │ │   └─base:::doWithOneRestart(return(expr), restart)
 22. │ └─base::stop(cond)
 23. └─(function (e) ...
Execution halted