Skip to content
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

Clarify column over allocation and modify by reference #60

Open
5 tasks
robitalec opened this issue Sep 17, 2023 · 0 comments
Open
5 tasks

Clarify column over allocation and modify by reference #60

robitalec opened this issue Sep 17, 2023 · 0 comments
Assignees

Comments

@robitalec
Copy link
Member

robitalec commented Sep 17, 2023

Related to kaijagahm/vultureUtils#44

This is documented in the FAQ here: https://docs.ropensci.org/spatsoc/articles/faq.html#package-design

But as mentioned in the thread above, not in the Value section of help pages beyond eg. "group_pts returns the input DT appended with a group column."

library(data.table)
library(dplyr, warn.conflicts = FALSE)

d1 <- data.table(x = 1)
attr(d1, "foo") <- "bar"
truelength(d1)
#> [1] 1025
d2 <- dplyr:::dplyr_col_select(d1, "x")
attr(d2, "foo")
#> [1] "bar"
truelength(d2)
#> [1] 0

Created on 2023-09-17 with reprex v2.0.2

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant