timestamp_to_seconds: Convert a timestamp to seconds from the start of the...

Description Usage Arguments Value See Also

Description

Convert a timestamp to seconds from the start of the recording.

Usage

1
2
timestamp_to_seconds(recording, t0, timeformat = "%Y%m%dT%H%M%S",
  return.indices = FALSE, signal = NULL)

Arguments

recording

A recording structure.

t0

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

timeformat

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

return.indices

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

signal

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

Value

The number of seconds corresponding to the timestamp, or if return.indices = TRUE, a two-element list containing the seconds and the indices corresponding to the timestamp.

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, timeintervals_to_seconds, timestamp_to_str


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