floor_date is needed in checking whether days have a full dataset or not
hydro.NumEvents(): moved check for NAs from na.omit() to na.rm = T inside the n_distinct function
hydro.DurEvents(): the difftime() function seems to leave out 1 value at the end of each inundation event, so have changed the function to count the number of rows that are an event, standardised by the sampling rate
hydro.DurEventsHrs(): new function to calculate duration of events in hours
hydro.IndDurDay(): removed the filter to only use days with complete data, as this resulted in different total inundation durations vs summary and event outputs. Will instead add another column to daily.stats that says whether the day contained a full dataset or not. Also corrected so value is divided by time difference, not multiplied
hydro.NonIndDurDay(): as above
added two new functions to calculate inundation / emersion per day in hours
removed peak current, wave orbital velocities, and and ebb-flood ratios throughout, since these are based on max values that can be spurious
modified 'Upper' current / wave orbital velocities / ebb-flood ratios to give the 95th percentile values, in place of the maximum values
modified all tables / text to accept the above changes
What's changed: