Skip to content

Allow the use of ..var in i #4958

@markfairbanks

Description

@markfairbanks

It would be useful if this was possible for use in i, much like it is possible to use in j:

library(data.table)

test_df <- data.table(x = 1:3, y = 1:3)
x <- 3

# Works in j
copy(test_df)[, new := y + ..x][]
#>    x y new
#> 1: 1 1   4
#> 2: 2 2   5
#> 3: 3 3   6

# Fails in i
test_df[y < ..x]
#> Error in .checkTypos(e, names_x): Object '..x' not found amongst x, y

Metadata

Metadata

Assignees

No one assigned

    Labels

    programmingparameterizing queries: get, mget, eval, env

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions