parse_epoch_string parses the epoch string (e.g. "1 min"), and outputs the corresponding number of samples it represents.

parse_epoch_string(epoch_str, sr)

## Arguments

epoch_str string. The input epoch str as accepted by breaks argument of cut.POSIXt. number. The sampling rate in Hz used to parse the epoch string.

## Value

number. The number of samples represented by the epoch string.

## Details

This function parses the given epoch string (e.g. "5 secs") and outputs the corresponding number of samples represented by the epoch string.

## How is it used in MIMS-unit algorithm?

This function is used in aggregate_for_mims function and mims_unit function.

Other utility functions: clip_data(), cut_off_signal(), interpolate_signal(), sampling_rate(), segment_data(), simulate_new_data()
# 1 min with 80 Hz = 4800 samples
parse_epoch_string('1 day', sr=10)#> [1] 864000