-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
enhancementprogrammingparameterizing queries: get, mget, eval, envparameterizing queries: get, mget, eval, envtop requestOne of our most-requested issuesOne of our most-requested issues
Milestone
Description
require(data.table) # devel compiled on 3rd March 2018
dt <- data.table(x=1:5, y=6:10, z=11:15)
# x y z
# 1: 1 6 11
# 2: 2 7 12
# 3: 3 8 13
# 4: 4 9 14
# 5: 5 10 15Now we can subset cols using the .. notation conveniently as follows:
cols <- "z"
dt[, ..cols]
# z
# 1: 11
# 2: 12
# 3: 13
# 4: 14
# 5: 15Since ..var has a very special meaning, we could also allow this?
dt[, c(..cols, "x")]Currently, it errors as follows:
# Error in eval(jsub, SDenv, parent.frame()) : object '..cols' not foundHaven't really given it a lot of thought.. Just came across it and wanted to file it as an issue so that it doesn't get lost.
franknarf1, mattdowle, msummersgill, zx8754, jangorecki and 2 more
Metadata
Metadata
Assignees
Labels
enhancementprogrammingparameterizing queries: get, mget, eval, envparameterizing queries: get, mget, eval, envtop requestOne of our most-requested issuesOne of our most-requested issues