USGS-R / Rainmaker

Repo being permanently moved to: https://code.usgs.gov/water/analysis-tools/Rainmaker
https://code.usgs.gov/water/analysis-tools/Rainmaker
Other
18 stars 14 forks source link

Suggested fix for hourly rainfall data #66

Closed arielreed closed 2 years ago

arielreed commented 2 years ago

I am working with hourly rain accumulation data and noticed that RMevents.R assumes that the time interval in the provided dataset is always minutes (there is a hard-coded conversion from hours to minutes here). However, the base R function diff will return units of hours or minutes based on the interval it detects (diff is used here).

Since ieHr is a user-provided parameter in hours, I have a solution that detects whether ieHr needs to be converted to minutes or remain in hours for a valid time comparison. Let me know if I should open a PR.

ldecicco-USGS commented 2 years ago

Hi Ariel, if you'd like to open a pull request I'd be happy to take a look. At the moment we don't have many resources to do enhancements, but I could certainly see if the PR would fit our needs. Thanks for reaching out!