Skip to content

Instantly share code, notes, and snippets.

View Aarleks's full-sized avatar

Alex Norman Aarleks

View GitHub Profile
@Aarleks
Aarleks / running_economy.R
Created December 7, 2017 14:29
Calculate and plot your relative running economy with Strava and R
library(rStrava)
library(ggplot2)
library(lubridate)
library(dplyr)
library(googledrive)
# Running Economy function
relative_economy <- function(distance, total_time, restingHR, averageHR){
total_beats <- (averageHR - restingHR) * (total_time/60)