Skip to content

Commit

Permalink
use a safer method of extracting the filename from a path (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman authored Dec 13, 2024
1 parent e285309 commit fb99feb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/run_calculate_match_success_rate.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ run_calculate_match_success_rate <- function(config) {

raw_lbk <- raw_lbk %>%
dplyr::mutate(
group_id = gsub(glue::glue("{dir_loanbooks}/"), "", .data[["group_id"]]),
group_id = gsub(".csv", "", .data[["group_id"]])
group_id = basename(.data[["group_id"]]),
group_id = sub("[.]csv$", "", .data[["group_id"]])
)

## load matched prioritized loan books----
Expand Down

0 comments on commit fb99feb

Please sign in to comment.