Skip to contents

This function generates a sequence of accelerometer counts representing the smallest bout with the largest inactive period. The length of the inactive period is determined by the value of maximum_number_consec_inactive_epochs_in_bout variable.

Usage

make_smallest_bout_with_largest_inactive_period(
  maximum_number_consec_inactive_epochs_in_bout = 3
)

Arguments

maximum_number_consec_inactive_epochs_in_bout

maximum number of consecutive inactive epochs in a bout before it is terminated

Value

A data frame with columns activity_counts and time, representing the accelerometer counts and the corresponding time stamps.

Examples

make_smallest_bout_with_largest_inactive_period()
#>    activity_counts bout non_wearing complete_day                time
#> 1                0    0       FALSE        FALSE 2012-04-07 00:00:30
#> 2                0    0       FALSE        FALSE 2012-04-07 00:01:00
#> 3                0    0       FALSE        FALSE 2012-04-07 00:01:30
#> 4                0    0       FALSE        FALSE 2012-04-07 00:02:00
#> 5              500    1       FALSE        FALSE 2012-04-07 00:02:30
#> 6              500    1       FALSE        FALSE 2012-04-07 00:03:00
#> 7              500    1       FALSE        FALSE 2012-04-07 00:03:30
#> 8              500    1       FALSE        FALSE 2012-04-07 00:04:00
#> 9              500    1       FALSE        FALSE 2012-04-07 00:04:30
#> 10               0    1       FALSE        FALSE 2012-04-07 00:05:00
#> 11               0    1       FALSE        FALSE 2012-04-07 00:05:30
#> 12               0    1       FALSE        FALSE 2012-04-07 00:06:00
#> 13             500    1       FALSE        FALSE 2012-04-07 00:06:30
#> 14             500    1       FALSE        FALSE 2012-04-07 00:07:00
#> 15             500    1       FALSE        FALSE 2012-04-07 00:07:30
#> 16             500    1       FALSE        FALSE 2012-04-07 00:08:00
#> 17             500    1       FALSE        FALSE 2012-04-07 00:08:30
#> 18               0    0       FALSE        FALSE 2012-04-07 00:09:00
#> 19               0    0       FALSE        FALSE 2012-04-07 00:09:30
#> 20               0    0       FALSE        FALSE 2012-04-07 00:10:00
#> 21               0    0       FALSE        FALSE 2012-04-07 00:10:30