This function is used in combination with get_combinations() and it derives the indexes of the time-to-exhaustion trials in the different combinations.

get_indexes(
  .data,
  power_output_column,
  time_to_exhaustion_column,
  combinations
)

Arguments

.data

A data frame containing a power output column and their respective time-to-exhaustion.

power_output_column

The name of the power output column. This value has to be in watts. Default to "PO".

time_to_exhaustion_column

The name of the time-to-exhaustion column. This value has to be in seconds. Default to "TTE".

combinations

The data derived from get_combinations().

Value

a tibble

Examples

combinations <- get_combinations(demo_critical_power, "PO", "TTE")

results_index <- get_indexes(demo_critical_power, "PO", "TTE", combinations)

results_index
#> # A tibble: 26 × 2
#>    index       data            
#>    <glue>      <list>          
#>  1 [1,2,3,4,5] <tibble [5 × 2]>
#>  2 [1,2,3,4]   <tibble [4 × 2]>
#>  3 [1,2,3,5]   <tibble [4 × 2]>
#>  4 [1,2,4,5]   <tibble [4 × 2]>
#>  5 [1,3,4,5]   <tibble [4 × 2]>
#>  6 [2,3,4,5]   <tibble [4 × 2]>
#>  7 [1,2,3]     <tibble [3 × 2]>
#>  8 [1,2,4]     <tibble [3 × 2]>
#>  9 [1,2,5]     <tibble [3 × 2]>
#> 10 [1,3,4]     <tibble [3 × 2]>
#> # … with 16 more rows