Plot Fourier Variation
Power spectrum of HRV data with ymaxratio from 1.7, 2.0 to 6.0
Figure 1 OIGAWA MARATHON 2023 Forier analysis, 2023-10-29
Power spectrum of HRV data with ymaxratio from 1.7, 2.0 to 6.0
Kizen Sasaki
2023 November 30
2023 December 08
Figure 1 OIGAWA MARATHON 2023 Forier analysis, 2023-10-29
---
title: "Plot Fourier Variation"
subtitle: "Power spectrum of HRV data with ymaxratio from 1.7, 2.0 to 6.0"
author:
- Kizen Sasaki
date: 2023-11-30
date-modified: today
date-format: 'YYYY MMMM DD'
language:
title-block-published: First version
titel-block-modified: This version
format:
html:
html-math-method: katex
code-tools: true
code-fold: true
code-link: true
pdf:
geometry:
- top=30mm
- left=30mm
docx: default
code-line-numbers: true
---
```{r}
#| echo: false
#| message: false
library(RHRV)
csv_xls <- "~/Documents/brevet/csv_xls/time_hr_1.csv"
data <- read.csv(csv_xls, header = TRUE)
hr <- data[,2]
rr <- 1/hr
rr = rr*60*1000
```
```{r}
#| echo: false
#| message: false
hrv.data <- CreateHRVData()
hrv.data <- SetVerbose(hrv.data, TRUE)
hrv.data$Beat$RR = rr
hrv.data$Beat$niHR = hr
hrv.data$Beat$Time = cumsum(rr)/1000
hrv.data <- BuildNIHR(hrv.data)
```
```{r}
#| echo: false
#| message: false
hrv.data <- InterpolateNIHR(hrv.data, freqhr = 4)
hrv.data <- CreateFreqAnalysis(hrv.data)
```
```{r}
#| echo: false
#| message: false
hrv.data <- SetVerbose(hrv.data, TRUE)
hrv.data <- CalculatePowerBand(hrv.data, indexFreqAnalysis = 1,
size = 300, shift = 30, sizesp = 2048, type = "fourier",
ULFmin = 0, ULFmax = 0.03, VLFmin = 0.03, VLFmax = 0.05,
LFmin = 0.05, LFmax = 0.15, HFmin = 0.15, HFmax = 0.4)
```
@fig-fourier OIGAWA MARATHON 2023 Forier analysis, 2023-10-29
```{r}
#| echo: false
#| message: false
#| fig-width: 8
#| fig-height: 11.31
#| label: fig-fourier
#| fig.cap: "Plot obtained with the PlotPowerBand for the Fourier-based analysis."
#| fig-subcap:
#| - ymaxratio = 1.7
#| - ymaxratio = 2.0
#| - ymaxratio = 3.0
#| - ymaxratio = 4.0
#| - ymaxratio = 5.0
#| - ymaxratio = 6.0
#| layout-ncol: 2
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 1.7)
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 2.0)
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 3.0)
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 4.0)
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 5.0)
PlotPowerBand(hrv.data, indexFreqAnalysis = 1, ymax = 210, ymaxratio = 6.0)
```