79368025

Date: 2025-01-18 21:58:37
Score: 0.5
Natty:
Report link

Is this what you are after?

dat %>%
  mutate(cumdist = seq.int(n())[order(VALUE)] / n(), .by = YEAR)

which gives

  YEAR VALUE   cumdist
1 1999     1 0.2500000
2 1999     2 0.5000000
3 1999     3 1.0000000
4 1999     2 0.7500000
5 2002     1 0.3333333
6 2002     2 0.6666667
7 2002     3 1.0000000
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Is this
  • High reputation (-2):
Posted by: ThomasIsCoding