This function interpolates the data based on the time column. It takes the breath-by-breath data and transforms it into second-by-second.

interpolate(.data)

Arguments

.data

Data retrieved from read_data().

Value

a tibble

Examples

## get file path from example data path_example <- system.file("example_cosmed.xlsx", package = "whippr") ## read data df <- read_data(path = path_example, metabolic_cart = "cosmed") df %>% interpolate()
#> # Metabolic cart: COSMED #> # Data status: interpolated data #> # Time column: t #> # A tibble: 2,159 x 114 #> t Rf VT VE VO2 VCO2 O2exp CO2exp `VE/VO2` `VE/VCO2` `VO2/Kg` #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 2 8.08 1.19 9.60 380. 301. 185. 52.9 25.3 31.9 4.58 #> 2 3 15.6 1.05 15.4 622. 483. 163. 46.8 24.9 31.9 7.50 #> 3 4 23.2 0.915 21.2 864. 665. 141. 40.8 24.5 31.9 10.4 #> 4 5 21.3 1.21 24.1 978. 767. 187. 54.9 24.6 31.6 11.8 #> 5 6 19.4 1.51 27.1 1091. 870. 233. 69.0 24.8 31.3 13.1 #> 6 7 17.5 1.81 30.0 1204. 973. 279. 83.1 24.9 30.9 14.5 #> 7 8 15.6 2.11 32.9 1317. 1075. 325. 97.2 25.0 30.6 15.9 #> 8 9 17.3 1.80 30.1 1176. 955. 279. 81.2 25.7 31.8 14.2 #> 9 10 19.0 1.49 27.2 1035. 834. 233. 65.2 26.5 33.0 12.5 #> 10 11 20.6 1.18 24.4 894. 714. 188. 49.2 27.3 34.1 10.8 #> # … with 2,149 more rows, and 103 more variables: R <dbl>, FeO2 <dbl>, #> # FeCO2 <dbl>, HR <dbl>, `VO2/HR` <dbl>, Load1 <dbl>, Load2 <dbl>, #> # Load3 <dbl>, Phase <dbl>, FetO2 <dbl>, FetCO2 <dbl>, FiO2 <dbl>, #> # FiCO2 <dbl>, Ti <dbl>, Te <dbl>, Ttot <dbl>, `Ti/Ttot` <dbl>, IV <dbl>, #> # PetO2 <dbl>, PetCO2 <dbl>, `P(a-et)CO2` <dbl>, SpO2 <dbl>, #> # `VD(phys)` <dbl>, `VD/VT` <dbl>, `Env. Temp.` <dbl>, `Analyz. Temp.` <dbl>, #> # `Analyz. Press.` <dbl>, `Env. Press.` <dbl>, Batteries <dbl>, PaCO2 <dbl>, #> # PaO2 <dbl>, PH <dbl>, SaO2 <dbl>, `HCO3-` <dbl>, `Bias Flow` <dbl>, #> # `La-` <dbl>, Hb <dbl>, EEm <dbl>, EEh <dbl>, EEkc <dbl>, EEbsa <dbl>, #> # EEkg <dbl>, PROg <dbl>, PROkc <dbl>, FATg <dbl>, FATkc <dbl>, CHOg <dbl>, #> # CHOkc <dbl>, `PRO%` <dbl>, `FAT%` <dbl>, `CHO%` <dbl>, npRQ <dbl>, `t #> # Rel` <dbl>, `mark Speed` <dbl>, `mark Dist.` <dbl>, `ST I` <dbl>, `ST #> # II` <dbl>, `ST III` <dbl>, `ST aVR` <dbl>, `ST aVL` <dbl>, `ST aVF` <dbl>, #> # `ST V1` <dbl>, `ST V2` <dbl>, `ST V3` <dbl>, `ST V4` <dbl>, `ST V5` <dbl>, #> # `ST V6` <dbl>, `S I` <dbl>, `S II` <dbl>, `S III` <dbl>, `S aVR` <dbl>, `S #> # aVL` <dbl>, `S aVF` <dbl>, `S V1` <dbl>, `S V2` <dbl>, `S V3` <dbl>, `S #> # V4` <dbl>, `S V5` <dbl>, `S V6` <dbl>, `P Syst` <dbl>, `P Diast` <dbl>, #> # Symptom <dbl>, DP <dbl>, Stage <dbl>, RR <dbl>, METS <dbl>, Qt <dbl>, #> # SV <dbl>, `Vt/FVC` <dbl>, Alt <dbl>, `GPS Speed` <dbl>, `GPS Dist.` <dbl>, #> # predVO2 <dbl>, BR <dbl>, `O2 Cost` <dbl>, EEtot <dbl>, IC <dbl>, #> # Step <dbl>, LogVE <dbl>, `P(A-a)O2` <dbl>, …