Apply a function to each element of a vector returning a dist_fns_list
Source: R/s3-dist_fns-class.R
map_dist_fns.RdAnalogous to purrr::map_dbl()
Arguments
- .x
A list or atomic vector.
- .f
a function to apply that returns a
dist_fnsS3 object (usually anas.dist_fns()call)- ...
Additional arguments passed on to the mapped function.
We now generally recommend against using
...to pass additional (constant) arguments to.f. Instead use a shorthand anonymous function:# 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.
- .progress
Whether to show a progress bar. Use
TRUEto turn on a basic progress bar, use a string to give it a name, or see progress_bars for more details.