-
Notifications
You must be signed in to change notification settings - Fork 1k
Improve melt error message for invalid measure.vars (#6512) #7549
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
Closed
ayushsingh9720
wants to merge
10
commits into
Rdatatable:master
from
ayushsingh9720:gsoc-fix-beginner-task
+26
−3
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4a82e90
Fix #6512: Informative error message for missing measure.vars
ayushsingh9720 a8cfc7e
Fix #6512: Resolve conflict, handle list inputs, use brackify
ayushsingh9720 3df9a7f
Fix syntax error: remove residual merge markers
ayushsingh9720 280dd83
Fix #6512: Ignore NAs in measure.vars and fix trailing whitespace
ayushsingh9720 3bf7984
Fix #6512: Ignore NAs in measure.vars and fix trailing whitespace
ayushsingh9720 c7d9f0c
Fix #6512: Update Test IDs, remove double brackets, and fix lint
ayushsingh9720 3688044
Fix #6512: Remove double brackets and fix test order
ayushsingh9720 4c992e1
Fix syntax error in tests.Rraw
ayushsingh9720 5bb9ff4
Final Fix: Remove extra brackets and clean test syntax
ayushsingh9720 c710f16
Fix CI: Wrap failing example in try() and silence n_read note
ayushsingh9720 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| if (getRversion() >= "2.15.1") utils::globalVariables(c("n_read")) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please explain this change! |
||
| # all non-exported / unused internal (utility) functions | ||
|
|
||
| isTRUEorNA = function(x) is.logical(x) && length(x)==1L && (is.na(x) || x) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,7 +133,7 @@ melt(DT, id.vars=1, measure.vars=c("c_1", "c_2"), na.rm=TRUE) # remove NA | |
| melt(DT, id.vars=1:2, measure.vars=patterns("^f_", "^d_"), value.factor=TRUE) | ||
| melt(DT, id.vars=patterns("[in]"), measure.vars=patterns("^f_", "^d_"), value.factor=TRUE) | ||
| # same as above, but provide list of columns directly by column names or indices | ||
| melt(DT, id.vars=1:2, measure.vars=list(3:4, c("d_1", "d_2")), value.factor=TRUE) | ||
| try(melt(DT, id.vars=1:2, measure.vars=list(3:4, c("d_1", "d_2")), value.factor=TRUE)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why try? |
||
| # same as above, but provide names directly: | ||
| melt(DT, id.vars=1:2, measure.vars=patterns(f="^f_", d="^d_"), value.factor=TRUE) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.