library(rlang)
In rlang, I have this.
quo(list(code = 1:10, data = !!(1:10)))
expr: ^list(code = 1:10, data = <int: 1L, 2L, 3L, 4L, 5L, ...>)
env: global
Then, I get an answer like this.
eval_tidy(quo(list(code = 1:10, data = !!(1:10))))
$code
[1] 1 2 3 4 5 6 7 8 9 10
$data
[1] 1 2 3 4 5 6 7 8 9 10
According to the definition
The !! operator unquotes its argument. It gets evaluated immediately in the surrounding context.
But, if I evaluation is right away, then I have this.
!!(1:10)
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
So, why is !!(1:10)
different from . . .
$data
[1] 1 2 3 4 5 6 7 8 9 10
Thanks,
Andre