Advertisement
pranavbanthia28

Untitled

Dec 6th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. exposure <- HS_Hatch %>%
  2. group_by(ClutchID) %>%
  3. summarize(first_visit = min(date_visit),
  4. last_visit = max(date_visit),
  5. exposure = last_visit - first_visit)
  6. https://stackoverflow.com/questions/40570221/calculate-difference-between-dates-by-group-in-r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement