R/purrr-map.R
, R/purrr-map2.R
, R/purrr-pmap.R
map.Rd
The map functions transform their input by applying a function to each element and returning a list/vector/data.table.
map()
returns a list
_lgl()
, _int
, _dbl
,_chr
, _df
variants return their specified type
_dfr
& _dfc
Return all data frame results combined utilizing row or column binding
map(.x, .f, ...)
map_lgl(.x, .f, ...)
map_int(.x, .f, ...)
map_dbl(.x, .f, ...)
map_chr(.x, .f, ...)
map_dfc(.x, .f, ...)
map_dfr(.x, .f, ..., .id = NULL)
map_df(.x, .f, ..., .id = NULL)
walk(.x, .f, ...)
map_vec(.x, .f, ..., .ptype = NULL)
map2(.x, .y, .f, ...)
map2_lgl(.x, .y, .f, ...)
map2_int(.x, .y, .f, ...)
map2_dbl(.x, .y, .f, ...)
map2_chr(.x, .y, .f, ...)
map2_dfc(.x, .y, .f, ...)
map2_dfr(.x, .y, .f, ..., .id = NULL)
map2_df(.x, .y, .f, ..., .id = NULL)
map2_vec(.x, .y, .f, ..., .ptype = NULL)
pmap(.l, .f, ...)
pmap_lgl(.l, .f, ...)
pmap_int(.l, .f, ...)
pmap_dbl(.l, .f, ...)
pmap_chr(.l, .f, ...)
pmap_dfc(.l, .f, ...)
pmap_dfr(.l, .f, ..., .id = NULL)
pmap_df(.l, .f, ..., .id = NULL)
pmap_vec(.l, .f, ..., .ptype = NULL)
A list or vector
A function
Other arguments to pass to a function
Whether map_dfr()
should add an id column to the finished dataset
ptype for resulting vector in map_vec()
A list or vector
A list to use in pmap