fitfileR_query

2024-04-17

knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.3.1

## 
## Attaching package: 'dplyr'

## The following objects are masked from 'package:stats':
## 
##     filter, lag

## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(FITfileR)


new_ride<-readFitFile('/Users/sarah/Downloads/new_project.fit') 
new_ride_records<-records(new_ride)%>% 
                  bind_rows()%>% 
                  arrange(timestamp)

str(new_ride_records)
## tibble [7,464 × 20] (S3: tbl_df/tbl/data.frame)
##  $ timestamp                   : POSIXct[1:7464], format: "2024-03-21 15:31:20" "2024-03-21 15:31:21" ...
##  $ position_lat                : num [1:7464] NA 51.7 51.7 51.7 51.7 ...
##  $ position_long               : num [1:7464] NA -0.0629 -0.0629 -0.0629 -0.0629 ...
##  $ gps_accuracy                : int [1:7464] NA 7 7 7 5 5 5 5 5 5 ...
##  $ altitude                    : num [1:7464] NA NA NA NA NA NA NA NA NA NA ...
##  $ distance                    : num [1:7464] NA 0 5.57 11.67 17.65 ...
##  $ heart_rate                  : int [1:7464] 99 100 100 100 99 99 98 98 98 98 ...
##  $ calories                    : int [1:7464] 0 0 0 0 0 0 0 0 0 0 ...
##  $ cadence                     : int [1:7464] 0 2 82 83 84 86 86 86 87 51 ...
##  $ speed                       : num [1:7464] NA 5.85 5.92 6.1 5.89 ...
##  $ power                       : int [1:7464] NA NA 158 133 110 104 90 82 69 34 ...
##  $ left_right_balance          : int [1:7464] NA NA 57 58 55 54 49 54 50 56 ...
##  $ combined_pedal_smoothness   : num [1:7464] NA NA 51.5 50 49.5 51.5 55 47 46 48 ...
##  $ temperature                 : int [1:7464] NA NA NA NA 19 19 19 19 19 19 ...
##  $ grade                       : num [1:7464] NA NA NA NA NA NA NA NA NA NA ...
##  $ ascent                      : int [1:7464] NA NA NA NA NA NA NA NA NA NA ...
##  $ descent                     : int [1:7464] NA NA NA NA NA NA NA NA NA NA ...
##  $ battery_soc                 : num [1:7464] NA 82 NA NA NA NA NA NA NA NA ...
##  $ total_hemoglobin_conc       : num [1:7464] NA NA NA NA NA NA NA NA NA NA ...
##  $ saturated_hemoglobin_percent: num [1:7464] NA NA NA NA NA NA NA NA NA NA ...
sessionInfo()
## R version 4.3.0 (2023-04-21)
## Platform: aarch64-apple-darwin20 (64-bit)
## Running under: macOS 14.4.1
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: Europe/London
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] FITfileR_0.1.8 dplyr_1.1.4   
## 
## loaded via a namespace (and not attached):
##  [1] vctrs_0.6.5      cli_3.6.2        knitr_1.43       rlang_1.1.3     
##  [5] xfun_0.39        generics_0.1.3   glue_1.7.0       bit_4.0.5       
##  [9] htmltools_0.5.5  fansi_1.0.6      rmarkdown_2.22   evaluate_0.21   
## [13] tibble_3.2.1     fastmap_1.1.1    yaml_2.3.7       lifecycle_1.0.4 
## [17] compiler_4.3.0   pkgconfig_2.0.3  rstudioapi_0.14  digest_0.6.31   
## [21] R6_2.5.1         tidyselect_1.2.1 utf8_1.2.4       pillar_1.9.0    
## [25] magrittr_2.0.3   tools_4.3.0      withr_3.0.0      bit64_4.0.5

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.