complex_map | R Documentation |
The complex mapping functions transform the output lists from common mapping functions found in the purrr
package to complex vectors.
map_cplx(.x, .f, ...)
map2_cplx(.x, .y, .f, ...)
imap_cplx(.x, .f, ...)
pmap_cplx(.l, .f, ...)
.x |
A list or atomic vector |
.f |
A function, formula, or vector (not necessarily atomic). If a function, it is used as is. If a formula, e.g.
This syntax allows you to create very compact anonymous
functions. Note that formula functions conceptually take dots
(that's why you can use If character vector, numeric vector, or list, it is
converted to an extractor function. Character vectors index by
name and numeric vectors index by position; use a list to index
by position and name at different levels. If a component is not
present, the value of |
... |
Arguments to the mapping function |
.y |
A vector of the same length as |
.l |
A list of vectors, such as a data frame. The length of |
Supported purrr
mapping functions:
Call .f
using an argument of .x
Call .f
using arguments of .x
and .y
Call .f
using arguments of .x
and names(.x)
Call .f
using arguments contained in .l
A complex vector coerced from the mapping function and arguments
complex, purrr::map, purrr::map2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.