No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

27 líneas
914B

  1. process_report_list <- function(report_list_raw, report_amended_score) {
  2. # select the correct report_id to use for each report group
  3. report_keep <-
  4. report_amended_score |>
  5. group_by(sboe_id, year, doc_name) |>
  6. slice_max(amended_score) |>
  7. # follow up to be certain there's only one report per group
  8. slice_max(report_id)
  9. report_keep_count <- report_keep |> count()
  10. if (any(report_keep_count$n > 1)) {
  11. stop("Have not successfully selected a single report per committee and report group.")
  12. }
  13. report_keep <- report_keep |> ungroup() |> select(report_id, matches("received|date"))
  14. report_list_raw |>
  15. select(-matches("received|date")) |>
  16. right_join(report_keep, by = "report_id") |>
  17. select(-committee_name, -doc_type, -tar_group, image_id = img_link) |>
  18. mutate(
  19. across(doc_name, as_report_factor),
  20. image_id = sub(".+?(\\d+)$", "\\1", image_id)
  21. )
  22. }