-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathfuture-walk.R
More file actions
94 lines (88 loc) · 1.48 KB
/
future-walk.R
File metadata and controls
94 lines (88 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#' @rdname future_map
#' @export
future_walk <- function(
.x,
.f,
...,
.options = furrr_options(),
.env_globals = parent.frame(),
.progress = FALSE
) {
furrr_map_template(
x = .x,
fn = .f,
dots = list(...),
options = .options,
progress = .progress,
type = "list",
purrr_fn_name = "walk",
env_globals = .env_globals
)
invisible(.x)
}
#' @rdname future_map2
#' @export
future_walk2 <- function(
.x,
.y,
.f,
...,
.options = furrr_options(),
.env_globals = parent.frame(),
.progress = FALSE
) {
furrr_map2_template(
x = .x,
y = .y,
fn = .f,
dots = list(...),
options = .options,
progress = .progress,
type = "list",
purrr_fn_name = "walk2",
env_globals = .env_globals
)
invisible(.x)
}
#' @rdname future_map2
#' @export
future_pwalk <- function(
.l,
.f,
...,
.options = furrr_options(),
.env_globals = parent.frame(),
.progress = FALSE
) {
furrr_pmap_template(
l = .l,
fn = .f,
dots = list(...),
options = .options,
progress = .progress,
type = "list",
purrr_fn_name = "pwalk",
env_globals = .env_globals
)
invisible(.l)
}
#' @rdname future_imap
#' @export
future_iwalk <- function(
.x,
.f,
...,
.options = furrr_options(),
.env_globals = parent.frame(),
.progress = FALSE
) {
future_walk2(
.x = .x,
.y = vec_index(.x),
.f = .f,
...,
.options = .options,
.env_globals = .env_globals,
.progress = .progress
)
}