timeintervals_to_seconds: Convert a time interval defined by two timestamps to seconds...

Description Usage Arguments Value See Also

Description

Convert a time interval defined by two timestamps to seconds from the start of the recording.

Usage

1
2
timeintervals_to_seconds(recording, t0, t1, timeformat = NULL,
  return.indices = FALSE, signal = NULL)

Arguments

recording

A recording structure.

t0

The start timestamp (as a string or as a POSIXct timestamp).

t1

The stop timestamp (as a string or as a POSIXct timestamp).

timeformat

The timeformat used to parse the strings (optional). Default is "%Y%m%dT%H%M%S".

return.indices

Boolean indicating whether the indices in the signal corresponding to the time intervalshould be returned. Optional, default is FALSE.

signal

A signal name found in the recording. Optional, default is NULL.

Value

A two-element list with The number of seconds corresponding to the start and stop timestamp, or if return.indices = TRUE, a four-element list containing the seconds and the indices corresponding to the time interval.

See Also

Other utilities: defactor, ensure_path, extract_segment_block, extract_segment_s, extract_segment_timestamp, extract_segment, generate_result_row, generate_segments_from_block, generate_segments, get_file_extension, get_filename_parts, hr_from_ibi, ibi_from_ecg, integrate_power, num_to_timestamp, replicate_df_row, seconds_to_indices, str_to_timestamp, timestamp_to_seconds, timestamp_to_str


bwrc/colibri documentation built on May 13, 2019, 9:10 a.m.