| %<-% | R Documentation |
Assign elements of a list, vector, or data frame to variables in the calling
environment. The left-hand side must be a call to base::c() containing
variable names. Nested c() calls unpack nested lists. Named, missing
arguments select elements by name (for example, c(cyl =, wt =)). A
..name collector receives the positional elements not consumed by the other
targets in the same c() call; it may occur at the beginning, middle, or end.
The anonymous .. collector discards those elements. Use . and _ to skip
exactly one element.
lhs %<-% rhs
lhs |
A destructuring target composed of variable names, nested
|
rhs |
A list, atomic vector, or data frame whose elements are assigned. |
The value of rhs, returned invisibly.
c(latitude, longitude) %<-% list(38.061944, -122.643889)
c(cyl =, wt =) %<-% mtcars
c(first, ..rest) %<-% letters
c(..skip, penultimate, last) %<-% 1:5
c(begin, ..middle, end) %<-% 1:5
c(name, c(x, y), .) %<-% list("station", list(1, 2), "unused")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.