hydrosolutions / riversCentralAsia

Package with helper functions to load, manage and analyze hydrometeorological data from Central Asia
GNU General Public License v3.0
1 stars 1 forks source link

plotAnnualFlowDurationCurve() is not working #115

Closed mengqi-z closed 2 years ago

mengqi-z commented 2 years ago

Hi @mabesa,

plotAnnualFlowDurationCurve() is giving me errors. Here is an example I tried.

Qdf <- tibble::tibble(
  Date = seq.Date(from = lubridate::as_date("2020-01-01"),
                  to = lubridate::as_date("2022-12-13"),
                  by = "month"),
  Q = rep(c(1:6, 6:1), 3)
)

DurationCurve <- computeAnnualFlowDurationCurve(Qdf, "Q", "Date")
plotAnnualFlowDurationCurve(data = DurationCurve, column = "Q")

The error message is as follows.

Error in `dplyr::group_by()`:
! Must group by variables found in `.data`.
✖ Column `HYear` is not found.

JOSS review https://github.com/openjournals/joss-reviews/issues/4805

mabesa commented 2 years ago

Resolved. Thank you for spotting this!