You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
endpoints() throws an error when not k > 0 for all cases of on except of the following: years, quarters and months. This is because the error is raised on the cases where the C implementation is used which checks for the values of k.
The case of on = months is an exception as here the C implementation is used but the k value is fixed at 1L.
endpoints(xx, on="ms", k=-1)
# Error in endpoints(xx, on = "ms", k = -1) : 'k' must be > 0
endpoints(xx, on="minutes", k=-1)
# Error in endpoints(xx, on = "minutes", k = -1) : 'k' must be > 0
endpoints(xx, on="days", k=-1)
# Error in endpoints(xx, on = "days", k = -1) : 'k' must be > 0
endpoints(xx, on="week", k=-1)
# Error in endpoints(xx, on = "week", k = -1) : 'k' must be > 0
endpoints() was not throwing an error for `k < 1` for `on` of "years",
"quarters", or "months". This is because the only check for `k < 1` was
in the C code called for the other values of `on`.
Thanks to Eluvias for the report.
Fixes#301.
endpoints()
throws an error when notk > 0
for all cases ofon
except of the following:years
,quarters
andmonths
. This is because the error is raised on the cases where theC
implementation is used which checks for the values ofk
.The case of
on = months
is an exception as here theC
implementation is used but thek
value is fixed at1L
.The cases of
on = quarters
oron = years
are using theR
implementation and they don't check fork > 0
.Examples
Error is raised when not
k > 0
Error is not raised when not
k > 0
The text was updated successfully, but these errors were encountered: