You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| List |\>2 vectors |`mapply()`, `Map()`|`pmap()`|
63
-
| Atomic vector of desired type | 1 vector |`vapply()`|`map_lgl()` (logical), `map_int()` (integer), `map_dbl()` (double), `map_chr()` (character), `map_raw()` (raw) |
64
-
| Atomic vector of desired type | 2 vectors |`mapply()`, `Map()`, then `is.*()` to check type |`map2_lgl()` (logical), `map2_int()` (integer), `map2_dbl()` (double), `map2_chr()` (character), `map2_raw()` (raw) |
65
-
| Atomic vector of desired type |\>2 vectors |`mapply()`, `Map()`, then `is.*()` to check type |`pmap_lgl()` (logical), `pmap_int()` (integer), `pmap_dbl()` (double), `pmap_chr()` (character), `pmap_raw()` (raw) |
66
-
| Side effect only |1 vector| loops |`walk()`|
67
-
| Side effect only |2 vectors| loops |`walk2()`|
68
-
| Side effect only |\>2 vectors | loops |`pwalk()`|
69
-
| Data frame (`rbind` outputs) | 1 vector |`lapply()` then `rbind()`|`map_dfr()`|
70
-
| Data frame (`rbind` outputs) | 2 vectors |`mapply()`/`Map()` then `rbind()`|`map2_dfr()`|
71
-
| Data frame (`rbind` outputs) |\>2 vectors |`mapply()`/`Map()` then `rbind()`|`pmap_dfr()`|
72
-
| Data frame (`cbind` outputs) | 1 vector |`lapply()` then `cbind()`|`map_dfc()`|
73
-
| Data frame (`cbind` outputs) | 2 vectors |`mapply()`/`Map()` then `cbind()`|`map2_dfc()`|
74
-
| Data frame (`cbind` outputs) |\>2 vectors |`mapply()`/`Map()` then `cbind()`|`pmap_dfc()`|
75
-
| Any | Vector and its names |`l/s/vapply(X, function(x) f(x, names(x)))` or `mapply/Map(f, x, names(x))`|`imap()`, `imap_*()` (`lgl`, `dbl`, `dfr`, and etc. just like for `map()`, `map2()`, and `pmap()`) |
76
-
| Any | Selected elements of the vector |`l/s/vapply(X[index], FUN, ...)`|`map_if()`, `map_at()`|
77
-
| List | Recursively apply to list within list |`rapply()`|`map_depth()`|
78
-
| List | List only |`lapply()`|`lmap()`, `lmap_at()`, `lmap_if()`|
60
+
| List | 1 vector |`lapply()`|`map()`|
61
+
| List | 2 vectors |`mapply()`, `Map()`|`map2()`|
62
+
| List |\>2 vectors |`mapply()`, `Map()`|`pmap()`|
| Atomic vector of desired type | 2 vectors |`mapply()`, `Map()`, then `is.*()` to check type |`map2_lgl()` (logical), `map2_int()` (integer), `map2_dbl()` (double), `map2_chr()` (character), `map2_vec()` (other vectors) |
65
+
| Atomic vector of desired type |\>2 vectors |`mapply()`, `Map()`, then `is.*()` to check type |`pmap_lgl()` (logical), `pmap_int()` (integer), `pmap_dbl()` (double), `pmap_chr()` (character), `pmap_vec()` (other vectors) |
66
+
| Side effect only |2 vectors| loops |`walk2()`|
67
+
| Side effect only |1 vector| loops |`walk()`|
68
+
| Side effect only |\>2 vectors | loops |`pwalk()`|
69
+
| Data frame (`rbind` outputs) | 1 vector |`lapply()` then `rbind()`|`map()`then `list_rbind()`|
70
+
| Data frame (`rbind` outputs) | 2 vectors |`mapply()`/`Map()` then `rbind()`|`map2()`then `list_rbind()`|
71
+
| Data frame (`rbind` outputs) |\>2 vectors |`mapply()`/`Map()` then `rbind()`|`pmap()`then `list_rbind()`|
72
+
| Data frame (`cbind` outputs) | 1 vector |`lapply()` then `cbind()`|`map()`then `list_cbind()`|
73
+
| Data frame (`cbind` outputs) | 2 vectors |`mapply()`/`Map()` then `cbind()`|`map2()`then `list_cbind()`|
74
+
| Data frame (`cbind` outputs) |\>2 vectors |`mapply()`/`Map()` then `cbind()`|`pmap()`then `list_cbind()`|
75
+
| Any | Vector and its names |`l/s/vapply(X, function(x) f(x, names(x)))` or `mapply/Map(f, x, names(x))`|`imap()`, `imap_*()` (`lgl`, `dbl`, `chr`, and etc. just like for `map()`, `map2()`, and `pmap()`)|
76
+
| Any | Selected elements of the vector |`l/s/vapply(X[index], FUN, ...)`|`map_if()`, `map_at()`|
77
+
| List | Recursively apply to list within list |`rapply()`|`map_depth()`|
78
+
| List | List only |`lapply()`|`lmap()`, `lmap_at()`, `lmap_if()`|
0 commit comments