The package dplyr has handy functions for this sort to of thing.
library(dplyr, warn.conflicts = FALSE)
Df <- data.frame(Claim = c("A", "A", "B", "B", "C", "C", "C", "D", "D", "E", "E"),
seq = c(1,2,1,2,2,3,4,4,5,1,2))
Df <- Df %>% group_by(Claim) %>%
mutate(outcome = ifelse(seq == min(seq), "Y", ""))
print(Df)
#> # A tibble: 11 x 3
#> # Groups: Claim [5]
#> Claim seq outcome
#> <chr> <dbl> <chr>
#> 1 A 1 "Y"
#> 2 A 2 ""
#> 3 B 1 "Y"
#> 4 B 2 ""
#> 5 C 2 "Y"
#> 6 C 3 ""
#> 7 C 4 ""
#> 8 D 4 "Y"
#> 9 D 5 ""
#> 10 E 1 "Y"
#> 11 E 2 ""
Created on 2020-12-19 by the reprex package (v0.3.0)