From 9c29e19de7c2878b486cca914ad15e345b01aba7 Mon Sep 17 00:00:00 2001 From: CJ Yetman - RMI Date: Thu, 8 Aug 2024 18:27:55 +0200 Subject: [PATCH] add a progress bar when matching loanbooks --- DESCRIPTION | 1 + run_matching.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 005d63e4..e034d2c0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,6 +15,7 @@ Description: This repo allows running PACTA analyses on multiple loan books in a exported to specified project paths. Encoding: UTF-8 Imports: + cli (>= 3.2.0), config, dplyr, ggplot2, diff --git a/run_matching.R b/run_matching.R index bdecb334..84708481 100644 --- a/run_matching.R +++ b/run_matching.R @@ -168,7 +168,7 @@ raw_lbk <- readr::read_csv( dplyr::group_split(.data$group_id) # match and save loan books---- -for (i in 1:length(raw_lbk)) { +for (i in cli::cli_progress_along(raw_lbk, "Matching loanbooks")) { group_name <- unique(raw_lbk[[i]]$group_id) ## match data----