-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Request] convert DT to xts efficiently #882
Comments
|
Thanks. You are right. The matrix is just a dimensioned vector. So by reference cannot be done. Closing as I don't see any alternative for this. non by-reference wrappers for xts-data.table conversion available here: https://github.com/jangorecki/dwtools/blob/b8981b5658509333378f6325d5b1a0c71bf9da9a/R/xts.R |
Jan - very nice answer : http://stackoverflow.com/a/27356884/403310 |
I can prepare PR to data.table.
I'm not sure but this might be related to lack of
Didn't check this one yet. |
I suppose, it's really |
I've address 2-5.
It has now the advantage over data.frame because it retains the class of index after conversion. as.data.table(my_xts)
as.xts.data.table(my_dt) Seems to not be related to lack of
looks like ti will not be handled nice using |
I've pushed it as a new DT branch: https://github.com/jangorecki/data.table/tree/as.xts |
@jangorecki looks great! Looks like you've .Rd files now. If they've to be merged to .Rraw, then yes, they have to be converted. I can help with that. But if you'd like to keep the file as-is, then maybe @lianos can help? He has setup tests for S4-classes using I'll push a |
Yes, can help w/ tests if you want to keep w/ |
There is not need to use |
Great. I can help you with that.. You can go ahead and make the PR... |
@lianos missed your reply before, sorry. I'm not sure if they're being run. I assumed so. What's the new suggested layout you refer to? |
I've pushed PR, |
Closes #882. xts <-> data.table conversions.
Proposed feature request:
As data.table is used in finance I wonder if we could convert to
xts
by reference?Assumptions:
POSIXct
orDate
numeric
orinteger
(others would be dropped)setDT
should also accept xts object to ensure the following is TRUE:setXTS(setDT(xts_obj)) == xts_obj
This may enhance the integration of data.table with already well developed functionalities around
xts
.The text was updated successfully, but these errors were encountered: