-
Notifications
You must be signed in to change notification settings - Fork 991
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
revdep msmtools (substitute in j) multiple failures after names(.SD) fix #6033
Comments
The error is reproducible with: dt = data.table(a = 1)
my_col = "a"
dt[, substitute(my_col) := .(3)]
## Error: LHS of := must be a symbol, or an atomic vector (column names or positions). AFAIU their code, the most straightforward fix would be to patch their code to use I will research more this weekend to figure out why the change caused the failures. Maybe there's an easy tweak on our side. |
I would say to fix it in DT, those are only pkgs on CRAN, there are many more. |
GitHub search finds ~10 usages: |
I installed 1.15.2 and see the same error when I run the reprex. The code change for #4163 was small - from I plan to make a change to check to see if Regarding those examples - there are only 2 unique examples that are uncommented and 2 unique examples that are commented out. There were some duplicates with forks / mirrors and then there were also some that were better use cases of |
@ColeMiller1 any update on this? |
@ben-schwen working on it now. I'll get it ASAP. |
I thought this was supposed to be fixed by #6238? It is still showing up on revdep checker, https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2024-07-16/ |
Thanks @tdhock I'll look again - I thought my MRE adequately reproduced the issue but it appears not. |
@tdhock are we sure there is still a problem? On master, I manually ran the vignettes and examples and didn't see any
|
I've got it narrowed down to this line: I'm really struggling to come up with an MRE though. On CRAN data.table, that step produces a column named |
This comment was marked as resolved.
This comment was marked as resolved.
Hmm, but the downstream code doesn't error in the |
This comment was marked as outdated.
This comment was marked as outdated.
I have looked some - could I make a PR on their side changing the line that errors? I've done it on my local and the vignette does not produce the error. Whatever made CRAN version of data.table work with this, I am not sure, but I believe this is more of an issue on their side. # old
final[ , paste( substitute( t_augmented ), '_int', sep = '' ) := as.integer( get( t_augmented ) ) ]
# new
final[ , paste0(t_augmented, '_int') := as.integer( get( t_augmented ) ) ] A few lines up from what you found, there is also this code. It doesn't seem to be related but if if ( missing( t_augmented ) ) {
t_augmented = 'augmented'
} else {
t_augmented = as.character( substitute( t_augmented ) )
} |
yes please send them a PR. You can use this issue template, https://github.com/Rdatatable/data.table/wiki/revdep-issue-template |
No additional changes need to be made on our side. The #6238 is still needed because that was an earlier error we encountered with this. I will make the PR over there this evening. Thanks for the link to the template. |
I agree, the code looks unusual to me. Should work fine without |
Downstream PR is filed and I just gave notice of the plan to release in August; closing here. |
since merging #4163 we get the following new check failures, not sure why, @ColeMiller1 @MichaelChirico could you please investigate?
The text was updated successfully, but these errors were encountered: