-
Notifications
You must be signed in to change notification settings - Fork 35
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
flast returns wrong values for POSIXct columns #91
Comments
Hi, thanks for flagging this. So first of all I hope I made it clear that you should not be using |
Hello, can you install collapse 1.5.0 and check this again for me? It seems to me the issue has vanished. |
Any update from your side? Otherwise I'll close this issue as it seems to have been resolved. |
It still looks like an issue to me.
|
Ok, thanks. It seems actually all statistical functions give the same set of dates. So it is definitely not an error in the code, but it appears to be that POSIXct classes require special treatment so just selecting the last double value and copying the attributes does not give you the right computation. I can try to add a special case for POSIXct, but it may take a while for me to understand the mechanics of it. So for the moment collapse can unfortunately not deal properly with POSIXct. |
Hello, so I have found the issue: I used a C API Macro SHALLOW_DUPLICATE_ATTRIB() to copy object attributes, which is more efficient but does not copy the object bits needed for classed objects. I now replaced this with DUPLICATE_ATTRIB() which does a better job. The only functions where I kept the old macro were fvar and fsd where I think applying them to dates does not make sense. Otherwise all other functions now aupport POSIXct and other classes. This is available now in the development version on github, and will go on CRAN in an update by mid next month. |
The last value returned by flast for posixct columns in this case the date column) is not the last value for the group.
I am using version 1.2.1
The text was updated successfully, but these errors were encountered: