plyr function in purrr style

llply(.data, .f = NULL, .progress = "none", .parallel = FALSE, ...)

ldply(.data, .f = NULL, ...)

laply(.data, .f = NULL, ...)

map_simplify(.data, .f = NULL, ...)

Arguments

.data

list to be processed

.progress

name of the progress bar to use, see create_progress_bar

.parallel

if TRUE, apply function in parallel, using parallel backend provided by foreach

...

other arguments passed on to .f

Examples

x <- list(a = 1:10, beta = exp(-3:3), logic = c(TRUE,FALSE,FALSE,TRUE))
llply(x, mean, .progress = "text")
#> $a
#> [1] 5.5
#> 
#> $beta
#> [1] 4.535125
#> 
#> $logic
#> [1] 0.5
#> 
llply(x, ~mean(.x), .progress = TRUE)
#> $a
#> [1] 5.5
#> 
#> $beta
#> [1] 4.535125
#> 
#> $logic
#> [1] 0.5
#> 
llply(x, quantile, probs = 1:3 / 4)
#> $a
#>    0%   25%   50%   75%  100% 
#>  1.00  3.25  5.50  7.75 10.00 
#> 
#> $beta
#>          0%         25%         50%         75%        100% 
#>  0.04978707  0.25160736  1.00000000  5.05366896 20.08553692 
#> 
#> $logic
#>   0%  25%  50%  75% 100% 
#>  0.0  0.0  0.5  1.0  1.0 
#>