set_ | R Documentation |
set_
is a normally-evaluating version of <-
.
set_enclos_
is a normally evaluating version of
<<-
.
set_(dest, val)
set_enclos_(dest, val)
dest |
A quotation specifying the destination environment
and name. This can also be an indexing, expression, and |
val |
The value to assign. |
set_
differs from [assign]
in that set_
will process
subassignments.
These helpers are here because it is tricky to use do_
with
<-
(see Note under do_).
set_
returns val
, invisibly.
set_(quo(x), 12) #equivalent to `x <- 12`
set_(quo(x[3]), 12) #equivalent to `x[3] <- 12`
e <- new.env()
set_(quo(x[3], e), 12) #assigns in environment `e`
set_enclos_(quo(x[3], e), 12) #assigns in a parent of environment `e`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.