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

Update Error Message to Explain Namespace Restrictions for := and let in data.table #6302

Merged
merged 2 commits into from
Jul 20, 2024

Conversation

Nj221102
Copy link
Contributor

closes #5357.

Summary of Changes:
The error message related to the use of := and let within the data.table package has been updated to provide clearer guidance on namespace appending. The new error message now includes specific information that namespace appending such as data.table:::= is not allowed.

  • The updated error message now reads:
    "Check that is.data.table(DT) == TRUE. Otherwise, :=, `:=`(...) and let(...) are defined for use in j, once only and in particular ways. Namespace appending such as data.table::`:=(...)` is not allowed. See help(\":=\")."
    

Details:
The functions := and let in data.table are designed to work with non-standard evaluation (NSE). When these functions are used with a namespace prefix (e.g., data.table:::=), the NSE mechanisms fail to operate as intended, leading to confusing error messages. The new error message is intended to directly address this misuse and guide users towards the correct usage patterns.

Copy link

Comparison Plot

Generated via commit 2e57461

Download link for the artifact containing the test results: ↓ atime-results.zip

Time taken to finish the standard R installation steps: 11 minutes and 20 seconds

Time taken to run atime::atime_pkg on the tests: 3 minutes and 25 seconds

R/data.table.R Outdated Show resolved Hide resolved
Copy link
Member

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MichaelChirico MichaelChirico merged commit 665b316 into master Jul 20, 2024
4 of 5 checks passed
@MichaelChirico MichaelChirico deleted the updating_error branch July 20, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with datat.table:: namespace appending (NSE)
2 participants