Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

20 lines
456B

  1. fix_sboe_id_missing <- function(sboe_id, report_id) {
  2. idx_missing <- which(sboe_id == "No Id")
  3. if (!length(idx_missing)) {
  4. return(sboe_id)
  5. }
  6. # can't fix `sboe_id` if we don't have a `report_id`
  7. idx_has_report_id <- which(!is.na(report_id))
  8. if (!length(idx_has_report_id)) {
  9. return(sboe_id)
  10. }
  11. idx_missing <- intersect(idx_missing, idx_has_report_id)
  12. sboe_id[idx_missing] <- paste0("NOID-", report_id[idx_missing])
  13. sboe_id
  14. }