-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Data.table scope issue in functions #342
Comments
there's an issue with disk.frame where it doesn't wor within functions. it's to do with the global scope and NSE. I am designing a revamp of how disk.frame handles NSE. But the caveat is that functions are unlikely to compose well. So this is a "known" issue. |
I found a workaround to the scope issue by sending the objects to the GlobalEnv: test_fun <- function(fun_dt) {
col_vect <<- "x"
print(fun_dt[, max(get(col_vect))])
} (or using assign) The problem is I can't modify the function I'm using so I'll need to wait for a fix to disk.frame or program myself a stopgap solution. In any case, thanks for your help. |
I'm new to disk.frame so maybe I'm misunderstanding how it works with data.table.
I run disk.frame version 0.50 and data.table version 1.14.0
The traceback for the error is:
The text was updated successfully, but these errors were encountered: