R allows for Replacement functions (http://adv-r.had.co.nz/Functions.html#replacement-functions, or https://cran.r-project.org/doc/manuals/R-lang.html#Subset-assignment) like levels(var)<-c(...). We can extend the syntax to allow for such attribute assignment. According to https://cran.r-project.org/doc/manuals/R-lang.html#Subset-assignment,
is equivalent to
`*tmp*` <- x
x <- "names<-"(`*tmp*`, value=c("a","b"))
rm(`*tmp*`)
The proposal is something like ``%@%(x, key, value), or `x%@%key <- value`.
[update: yes!] should be interpreted as
`@`(x, key) <- val
`@<-`(x, key, value=val)
[update: no!] or if evaluation starts from <- first.
which won't make any sense.
R allows for Replacement functions (http://adv-r.had.co.nz/Functions.html#replacement-functions, or https://cran.r-project.org/doc/manuals/R-lang.html#Subset-assignment) like
levels(var)<-c(...). We can extend the syntax to allow for such attribute assignment. According to https://cran.r-project.org/doc/manuals/R-lang.html#Subset-assignment,is equivalent to
The proposal is something like ``%@%
(x, key, value), or `x%@%key <- value`.[update: yes!] should be interpreted as
[update: no!] or if evaluation starts from
<-first.which won't make any sense.