Created
December 19, 2019 23:29
-
-
Save arvi1000/70ba5c70261d44bd886fbb2b11e6d624 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
adj_ftp <- function(rider_kg=70, watts_kg_ftp=3, extra_kg) { | |
watts <- watts_kg_ftp * rider_kg | |
adj_wkf <- watts / (rider_kg + extra_kg) | |
return(adj_wkf) | |
} | |
tibble(extra_kg = seq(0, 5, .1), | |
rider_55kg = adj_ftp(rider_kg = 55, extra_kg = extra_kg), | |
rider_85kg = adfj_ftp(rider_kg = 85, extra_kg = extra_kg)) %>% | |
data.table::melt(id.var='extra_kg') %>% | |
ggplot(aes(extra_kg, value, color=variable)) + | |
geom_line() + | |
theme_light() + | |
labs(color='Rider weight', y='Adjusted watts/kg', | |
title='Influence of extra weight on effective watts/kg', | |
subtitle = 'for heavy and light riders with same base watts/kg') |
Author
arvi1000
commented
Dec 19, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment