79791210

Date: 2025-10-15 13:20:58
Score: 0.5
Natty:
Report link

Shortly after posting, I found uncount()which addresses my issue.

data.frame(year = rep(c(1, 2), each = 5),
           site = rep(LETTERS[1:2], 5),
           n    = sample(1:25, 10, replace = TRUE)) %>% uncount(n)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: tnt