map_precisely() is a wrapper around tidyr::crossing() and purrr::pmap_dfr() to give a set of values to any of the calculation functions in precisely. All possible combinations of the values are passed to the function, returning a tibble where each row is the result for each combination.

map_precisely(.f, ...)

Arguments

.f

a function in precisely

...

arguments passed to .f. All possible combinations of argument values are given to the function.

Value

a tibble

Examples

map_precisely( n_risk_difference, precision = seq(from = .02, to = .20, by = .005), exposed = c(.2, .4), unexposed = c(.1, .3), group_ratio = 1 )
#> # A tibble: 148 x 9 #> n_exposed n_unexposed n_total risk_difference precision exposed unexposed #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 9604. 9604. 19207. 0.1 0.02 0.2 0.1 #> 2 14213. 14213. 28427. -0.100 0.02 0.2 0.3 #> 3 12677. 12677. 25354. 0.3 0.02 0.4 0.1 #> 4 17287. 17287. 34573. 0.1 0.02 0.4 0.3 #> 5 6146. 6146. 12293. 0.1 0.025 0.2 0.1 #> 6 9097. 9097. 18193. -0.100 0.025 0.2 0.3 #> 7 8113. 8113. 16226. 0.3 0.025 0.4 0.1 #> 8 11063. 11063. 22127. 0.1 0.025 0.4 0.3 #> 9 4268. 4268. 8537. 0.1 0.03 0.2 0.1 #> 10 6317. 6317. 12634. -0.100 0.03 0.2 0.3 #> # … with 138 more rows, and 2 more variables: group_ratio <dbl>, ci <dbl>