map | R Documentation |
Lapply with Custom Return Type
map(x, f, output_type = "list")
x |
A vector or list |
f |
A function |
output_type |
The desired return type. Should be one of "list" (the default), "integer", "numeric" or "character". |
A list (if output_type = "list") or a vector, sharing names with x,
built by applying f to each element of x. This is a rough implementation
of the map
function from the purrr
package and aims at removing the
dependency from that package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.