Please see the brief presentation on heart rate variability, QRS complex, and why HRV is important.
This tutorial will use the RHRV
package for the majority of analyses and graphing. In addition, it will supplement these with custom functions (which can be found on the GitHub), and scripts from PhysioScript
. In general, this tutorial also attempts to follow the principles of tidy data, and will utilize various functions and ideas from the tidyverse
group of packages.
If you would like to follow along, first either clone or download the repository. Then, load all of the necessary packages into your session.
check <- require(pacman)
if(check==FALSE) {install.packages('pacman')} else(rm(check))
pacman::p_load(RHRV, reticulate, here)
Next, you can load the PhysioScript
functions by using load()
.
## Check to see where your root directory is
## Make sure it is inside of the project folder
here()
load(here('R/hrv_tutorial/PhysioScript.RData'))
You can then examine what each of these functions do by clicking on them. If you have the desire to clean your Global Environment you can remove all of the functions by running the command rm(list=ls())
, or all of them except specific ones by naming them explicitly to keep like so:
rm(list= ls()[!(ls() %in% c('process.ecg','extract.ibi', 'read.vars', 'read.data'))])
Lastly, we will be using some python code to read in the raw AcqKnowledge files. If you are familiar with python, and have pip
installed on your system, you can execute the following command to get the necessary package.
pip install bioread
This brief tutorial will consist of the following topics:
1). Extracting electrophysiology data from raw files
2). Prepare files and compute interbeat interval (IBI)
3). Check for outliers and graph
You can navigate to the appropriate section by clicking the links above or using the dropdown menu at the top of the page.