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
dplyr creates deep copies of data.tables #614
Comments
Oh hmmm, it seems to me like @arunsrinivasan any thoughts on the best way to do a shallow copy in dt? |
@hadley, we've |
@arunsrinivasan a pull request would be awesome! |
@arunsrinivasan any change on this? If not, I'll put off until the next release. |
Not yet, sorry. Likely in |
@arunsrinivasan Sorry: You said 1.9.8 -- I guess it's in the pipeline then? |
From the documentation of dplyr, "mutate() never copies columns, except when you modify an existing column". But this is not true for data.tables.
While for a data.table object
The fonction
copy()
inside the code formutate
seems to do a deep copy and not a shallow copy.Maybe shallow copies can be used. I don't know the right way to do it but this seems to work:
The text was updated successfully, but these errors were encountered: