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

147 views Asked by At

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.

1

There are 1 answers

0
Steven Lawrence On BEST ANSWER

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)