-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Description
out_day <- sum(
sipnet_output$year == simulation_years[1] &
sipnet_output$day == unique(sipnet_output$day)[1],
na.rm = TRUE
) # switched to day 2 in case first day is partial
My comment in #3622 (comment) :
Another one for a separate PR: The comment about "day 2" seems out of sync with the code and makes me wonder if there are more edge cases hiding here in cases of (1) incomplete first day as commented; (2) uneven output time steps.
Should it be unique(sipnet_output$day)[2]
? Or probably better, should it check all days instead of assuming any one is authoritative?
When thinking through this, also consider whether this needs to support timesteps of 1x/day or less -- I bet not, but might be wise to check for that and error loudly.
Metadata
Metadata
Assignees
Labels
No labels