-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
121 lines (85 loc) · 4.46 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
fig.width = 6,
fig.asp = 0.618,
dpi = 300
)
```
# spiro <img src="man/figures/spiro_logo.png" align="right" width = "160" />
<!-- badges: start -->
[](https://www.repostatus.org/#active)
[](https://CRAN.R-project.org/package=spiro)
[](https://doi.org/10.21105/joss.05089)
[](https://github.com/ropensci/spiro/actions)
[](https://app.codecov.io/gh/ropensci/spiro)
[](https://github.com/ropensci/software-review/issues/541)
<!-- badges: end -->
## Overview
This R package offers a fast, standardized and reproducible workflow for data
from cardiopulmonary exercise testing. It offers tools for data import,
processing, summary and visualization.
## Background
Measuring gas exchange during physical exercise is a common procedure in sports science and medicine. It allows to assess the functional limit of the cardiovascular system, evaluate the success of training interventions, and diagnose cardio-respiratory diseases. The measuring devices of cardiopulmonary exercise testing --- so-called metabolic carts --- output their data in different formats. Moreover, measured breath-by-breath data is noisy and requires post-processing. This package standardizes the import and processing of raw data from different metabolic carts.
## Installation
Install `spiro` from CRAN:
``` {r install, eval = FALSE}
install.packages("spiro")
```
Install the current development version of `spiro` from GitHub:
``` {r install-dev, eval = FALSE}
if (!require(remotes)) install.packages("remotes")
remotes::install_github("ropensci/spiro")
```
## Usage
Main functions:
* Use `spiro()` to automatically import and process raw data from
cardiopulmonary exercise testing.
* Use `spiro_summary()` for a summary of cardiopulmonary parameters (e.g., relative oxygen uptake, respiratory quotient, heart rate, ...) for each load step.
* Use `spiro_max()` to calculate maximum parameter values (e.g., VO2max).
* Use `spiro_plot()` to visualize the data as a modifiable Wassermann 9-Panel Plot.
Further functionality:
* Add external heart rate data from a .tcx file.
* Automated guessing or manual setting of exercise protocols.
* Different data filtering strategies for VO~2max~ determination (moving time averages, moving breath averages, Butterworth filters)
#### Metabolic Carts
The following metabolic carts are currently supported by `spiro`:
* Cortex
* Cosmed
* Vyntus
* ZAN
Support for further metabolic carts is planned for future releases.
## Example
```{r example, warning = FALSE, fig.width = 10, fig.height = 8}
library(spiro)
# get data path for example
file <- spiro_example("zan_gxt")
# import and process the raw data
gxt_data <- spiro(file)
# summary of parameters by load step
spiro_summary(gxt_data)
# maximum values
spiro_max(gxt_data)
# Wassermann 9-Panel Plot
spiro_plot(gxt_data)
```
## Citation
```{r citation, collapse=FALSE, comment=""}
citation("spiro")
```
## Related Work
The [whippr](https://github.com/fmmattioni/whippr) package offers a different
approach to working with data from cardiopulmonary exercise testing. It
additionally offers functions for analyzing VO2 kinetics.
## Acknowledgment
The following persons contributed to this package by providing raw data files, reviewing code and/or suggesting features:
Daniel Appelhans, Michael Beaven, James Hunter, Virgile Lecoultre, Sebastian Mühlenhoff, Manuel Ramon, Anton Schiffer, Yannick Schwarz, Adrian Swoboda, Andreas Wagner.
## Contributing
If you consider contributing to this package, read the [CONTRIBUTING.md](https://github.com/ropensci/spiro/blob/main/.github/CONTRIBUTING.md). Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.