This function takes a list and calculates individual contributions as a proportion of total work completed. The output is a dataframe.

calculate_contributions(contributions = NULL)

Arguments

contributions

A list object (defaults to NULL)

Examples

ex <- list("p1" = c(1:13), "p2" = 1, "p3" = c(1, 3, 5, 9))
calculate_contributions(ex)
#> # A tibble: 3 × 3
#>   contributors total_contributions percent_contributed
#>   <fct>                      <int>               <dbl>
#> 1 p1                            13              0.722 
#> 2 p2                             1              0.0556
#> 3 p3                             4              0.222