Codrin Mironiuc
Codrin Mironiuc

Reputation: 133

How does the "LoadBeatRR" function from the RHRV package work?

I was trying to analyze my RR intervals using the RHRV package.

I have used:

hrv.data = CreateHRVData()
hrv.data = SetVerbose(hrv.data, TRUE)

hrv.data = LoadBeatRR(hrv.data, "dataset.txt", RecordPath = "#the path of dataset.txt here", datetime = "1/1/1900 0:0:0", verbose = NULL)

Unfortunately, when I do this I get the warning message :

"NAs introduced by coercion".

And all my following analyses do not work. I do not see what the problem could be.

Upvotes: 1

Views: 161

Answers (1)

Steven Lawrence
Steven Lawrence

Reputation: 26

You should make sure the time, hr and rr variables are named as such: "Time", "niHR", and "RR" respectively.

A work-around would to just to manually create the beat object.

hrv.data$Beat <- readr::read_delim("txt file") %>% 
                 dplyr::rename("Time" = time, "niHR" = hr, "RR" = rr) %>%
                 dplyr::select(Time, niHR, RR)

hrv.data <- RHRV::BuildNIHR(hrv.data)

Upvotes: 1

Related Questions