Learn R Programming

RHRV (version 5.0.0)

LoadBeatVector: Loads beats positions from an R vector

Description

Stores the beat positions from an R vector under the HRVData data structure.

Usage

LoadBeatVector(HRVData, beatPositions, scale = 1, datetime = "1/1/1900 0:0:0")

Value

A HRVData structure containing the heartbeat positions from the beatPositions vector.

Arguments

HRVData

Data structure that stores the beats recording and information related to it

beatPositions

Numeric vector with the heartbeats occurrence's times since the beginning of the recording. See scale parameter to specify the units

scale

Numeric value identifying the temporal units in which the beat positions are specified: 1 if beat positions is specified in seconds, 0.001 if beat positions in milliseconds, etc.

datetime

Date and time (DD/MM/YYYY HH:MM:SS) of the beginning of the recording

Examples

Run this code
if (FALSE) {
hd = CreateHRVData()
hd = LoadBeatVector(hd, 
     c(0.000, 0.328, 0.715, 0.124, 1.50,1.880, 2.268, 2.656))
hd = BuildNIHR(hd)
# ... continue analyzing the recording
}

Run the code above in your browser using DataLab