-
Notifications
You must be signed in to change notification settings - Fork 982
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
eplusr error on upgrade data.table #4612
Comments
This is a regression. Still haven't quite nailed down an MRE but it's do do with using a variable in j from the same environment, which is causing the |
I am the author of eplusr package. Maybe I can help to provide a MRE here. But I did not know how to install the version that cause this error. Can I directly install the dev version of data.table via |
@hongyuanjia That is correct. The release candidate version in current development is in the main branch, and with that |
Thanks @hongyuanjia , yes the latest dev reproduced the error for me. However it stopped reproducing as the |
I can recommend registering a GITHUB_PAT and setting it as an environment variable. |
Below is a MRE. Seems like a scoping issue: library(data.table)
dt <- data.table(id = c(1, 1, 2), value = c("a", "b", "c"))
fun <- function (dt, tag = c("A", "B")) {
dt[, var := tag[[.GRP]], by = "id"]
}
fun(dt)
#> Error in eval(call("is.atomic", jsub[[2L]]), envir = x): object 'tag' not found Created on 2020-07-20 by the reprex package (v0.3.0) |
Interesting. Inside library(data.table)
dt <- data.table(id = c(1, 1, 2), value = c("a", "b", "c"))
fun1 <- function (dt, tag = c("A", "B")) {
# using "[[" does not work
dt[, var := tag[[.GRP]], by = "id"]
}
fun1(dt)[]
#> Error in eval(call("is.atomic", jsub[[2L]]), envir = x): object 'tag' not found
fun2 <- function (dt, tag = c("A", "B")) {
# using "[" works
dt[, var := tag[.GRP], by = "id"]
}
fun2(dt)[]
#> id value var
#> 1: 1 a A
#> 2: 1 b A
#> 3: 2 c B Created on 2020-07-20 by the reprex package (v0.3.0) |
The error comes from: Line 1545 in 1a8a390
where |
I can confirm that all errors are caused by this issue. After I temporarily getting workaround on this, all check errors are gone and eplusr can work well with dev version of data.table. |
Thanks @hongyuanjia for the MRE. I do think |
@MichaelChrico I looked into this - it looks like simply adding |
Thanks @ColeMiller1 I had tried that but I only tried it on a non-MRE so it didn't work. Glad it's as easy as that.
|
The text was updated successfully, but these errors were encountered: