Takes a trial results dataframe, extracts durations of each unique label within nested tibbles and returns the distribution of durations per label and proportion of total time.

get_label_distribution(df, outer_col, inner_col)

Arguments

df

A trial results df

outer_col

The column containing nested tibbles. (string)

inner_col

The column within a nested tibble

Details

If the trial results dataframe is grouped then it returns a tibble with the distributions nested in distributions column per group.