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

revdep getDTeval affected #5127

Closed
mattdowle opened this issue Sep 1, 2021 · 9 comments · Fixed by #5849 · May be fixed by #5133
Closed

revdep getDTeval affected #5127

mattdowle opened this issue Sep 1, 2021 · 9 comments · Fixed by #5849 · May be fixed by #5133
Labels
revdep Reverse dependencies
Milestone

Comments

@mattdowle
Copy link
Member

Same as #5125

On line 138 of getDTeval it does :

names(the.result) <- gsub(pattern = "`", replacement = "", x = names(the.result))

which drops the key and causes :

> test_check("getDTeval")
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure (test-getDteval.R:68:2): create a new column ────────────────────────
getDTeval(...) not equal to formulaic::snack.dat[, `:=`(age_decades, floor(get(age.name)/10))].
Datasets has different number of (non-excluded) attributes: target 2, current 3

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 4 ]
Error: Test failures
Execution halted
@tdhock
Copy link
Member

tdhock commented Nov 23, 2022

git bisect says that this error started happening after merging #5084

@tdhock tdhock added the revdep Reverse dependencies label Nov 23, 2022
@mattdowle
Copy link
Member Author

Thanks for doing the bisect, but did you see #5133 linked above which mentions that?

@tdhock
Copy link
Member

tdhock commented Nov 24, 2022

I didn't, thanks for the info, glad to see there is a fix in the works!

@mattdowle
Copy link
Member Author

I remember struggling with it. Hopefully fresh eyes will help.

@jangorecki jangorecki modified the milestones: 1.14.9, 1.15.0 Oct 29, 2023
@MichaelChirico
Copy link
Member

This still reproduces on current master + CRAN getDTeval, and not on CRAN data.table (1.14.10).

@MichaelChirico
Copy link
Member

Minimized example (I didn't see a truly minimal example yet across the various issues & open PR)

DT <- data.table(a = 1)
setindex(DT, a)
names(DT) <- "b"
"index" %in% names(attributes(DT))
# on CRAN
# [1] TRUE
# on master
# [1] FALSE

@tdhock
Copy link
Member

tdhock commented Dec 23, 2023

I believe we should keep this open until the revdep fixes this, or until it disappears from the revdep checker (currently still there) https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2023-12-22/

@tdhock tdhock reopened this Dec 23, 2023
MichaelChirico added a commit to MichaelChirico/getDTeval that referenced this issue Dec 23, 2023
See Rdatatable/data.table#5127. `names<-.data.table` is discouraged; use `setnames()` whenever you know the input object is a data.table.
@MichaelChirico
Copy link
Member

Filed downstream: MB4511/getDTeval#1

@MichaelChirico
Copy link
Member

Now fixed+verified:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revdep Reverse dependencies
Projects
None yet
4 participants