You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 line
400B

  1. report_path_info <- function(report_path) {
  2. # data-raw/reports/{sboe_id}/all/{report_id}_{received_date}.txt
  3. report_path <- fs::path_abs(report_path)
  4. x <- fs::path_rel(report_path, here::here("..", "data-raw", "reports"))
  5. x <- map(x, path_split) |> list_flatten()
  6. tibble(
  7. sboe_id = map_vec(x, \(x) x[1]),
  8. report_id = map_int(x, \(x) as.integer(strsplit(x[3], "_")[[1]][1])),
  9. )
  10. }