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

Delete incorrect comment regarding as_tibble #417

Open
brookslogan opened this issue Feb 9, 2024 · 3 comments
Open

Delete incorrect comment regarding as_tibble #417

brookslogan opened this issue Feb 9, 2024 · 3 comments
Labels
cleanup improvements to developing&building experience&quality, not directly to built pkg&docs

Comments

@brookslogan
Copy link
Contributor

We say that as_tibble de-aliases data.table columns here, but it doesn't. We should still probably be good since [.data.table with an i arg (but not unique.data.table, probably a bug) seems to consistently copy. It's just the comment that's wrong.

@brookslogan brookslogan added the cleanup improvements to developing&building experience&quality, not directly to built pkg&docs label Feb 9, 2024
@brookslogan
Copy link
Contributor Author

brookslogan commented Feb 9, 2024

If we wanted to be more careful here, we could try to detect column-aliasing & copy in that case.

@brookslogan
Copy link
Contributor Author

Another probably-inaccurate comment:

  # We don't want to directly use `dplyr::mutate` on the `$DT`, as:
  # - this likely copies the entire table

@brookslogan
Copy link
Contributor Author

brookslogan commented Feb 9, 2024

It might actually be okay to alias in these cases if we never mutate archive DT columns without copying first (and if the user doesn't mutate the epi_df columns, which seems okay to assume since that's the general rule in R). I'm not sure whether that's the case or not though. It seems plausible, since IIRC we don't really do partial column modifications, though there are still key-ing operations or whole-column operations that still mutate that might be of concern.

@nmdefries nmdefries added this to the Epiprocess Issue Triage milestone Feb 20, 2024
dshemetov added a commit that referenced this issue Mar 18, 2024
dshemetov added a commit that referenced this issue Mar 21, 2024
dshemetov added a commit that referenced this issue Apr 18, 2024
dshemetov added a commit that referenced this issue Apr 30, 2024
dshemetov added a commit that referenced this issue Apr 30, 2024
* remove comment #417
* bump version to 0.7.6 and add NEWS line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup improvements to developing&building experience&quality, not directly to built pkg&docs
Projects
None yet
Development

No branches or pull requests

2 participants