The goal of flatcat is to provide flat map functions.
And the development version from GitHub with:
No size 1 restriction in each .f
call
library(flatcat)
library(purrr)
map_dbl(list(1, 2:3, 4:6), ~.x)
#> Result 2 must be a single double, not an integer vector of length 2
flat_map_dbl(list(1, 2:3, 4:6), ~.x)
#> [1] 1 2 3 4 5 6
A neat (but fairly inefficient) way to interleave vectors
With data frames