-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can infinite values be supported in IDate? #2256
Comments
just adding that i've run into this issue as well, had to write a wrapper function for the special case. |
I'm also dealing with this issue. If you want to stick with IDate you can wrap it with an
|
related discussion on r-devel https://stat.ethz.ch/pipermail/r-devel/2019-March/077435.html |
We could do something like this (and analogously for
Otherwise, change the
|
A little off-topic but I really think So personally I avoid to use the Maybe we should provide an alternative to the |
This is a mathematical consideration, from
Also note that in this case, the issue doesn't come from I think the behavior is a bit annoying but reasonable. As you said, if you anticipate an empty set into |
I like the idea of using +/- the machine max int, though I guess further related changes would be desirable for consistency:
In math-like jargon, the goal is that the space of IDates is closed under +, min, max and that NAs in an IDate only mean missing data (while inexpressibly large and small IDates are distinguished from each other and from NA).
Maybe I have just gotten used to it, but I find the behavior makes sense. |
sounds good. will do this but it'll be breaking in case anyone was relying on the bounds for other purposes. will have to wait for next release |
I'm taking the max or min of an empty IDate vector, but finding my code breaks since the return value is sometimes float, sometimes integer:
Since R's integer storage mode doesn't allow Inf or -Inf, I'm guessing IDate cannot be used for this..? My workaround is dropping to Date class:
The text was updated successfully, but these errors were encountered: