mcmap | R Documentation |
mcmap()
is a variant of parallel::mclapply()
that accepts a formula as .f
.
mcmap(.x, .f, ..., .mc.cores = getOption("mc.cores", 2L))
mcmap_lgl(.x, .f, ..., .mc.cores = getOption("mc.cores", 2L))
mcmap_int(.x, .f, ..., .mc.cores = getOption("mc.cores", 2L))
mcmap_dbl(.x, .f, ..., .mc.cores = getOption("mc.cores", 2L))
mcmap_chr(.x, .f, ..., .mc.cores = getOption("mc.cores", 2L))
.x |
A list or atomic vector. |
.f |
A function, specified in one of the following ways:
|
... |
Additional arguments passed on to the mapped function. We now generally recommend against using # Instead of x |> map(f, 1, 2, collapse = ",") # do: x |> map(\(x) f(x, 1, 2, collapse = ",")) This makes it easier to understand which arguments belong to which function and will tend to yield better error messages. |
.mc.cores |
integer |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.