Last active
October 12, 2021 13:39
-
-
Save daviddalpiaz/a04069fd95fc652181f97f221349e9ab to your computer and use it in GitHub Desktop.
general gainz workout generator
This file contains 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
# https://i.imgur.com/tqoTyK3.jpg | |
# TODO: add rest timings | |
# TODO: add weight based on previous? | |
# TODO: push / hold / find / extend | |
# TODO: 4.5 -> 4/3 | |
gen_workout = function(type = "full") { | |
tier_1_lift = sample(c("ossumo", "bp", "ohp"), size = 1, prob = c(2, 1, 1)) | |
tier_2_lift = sample(c("hbbs", "bp", "ohp"), size = 1, prob = c(2, 1, 1)) | |
tier_3_lift = sample(c("dbr", "sr", "hc", "bc"), size = 1, prob = c(4, 1, 1, 1)) | |
tier_1_reps = sample(3:6, size = 1) | |
tier_2_reps = sample(6:10, size = 1) | |
tier_3_reps = sample(c(40, 50, 60), size = 1) | |
tier_1 = data.frame( | |
tier = 1, | |
lift = c(tier_1_lift, tier_1_lift), | |
reps = c(tier_1_reps, 1), | |
sets = c(1, tier_1_reps) | |
) | |
tier_2 = data.frame( | |
tier = 2, | |
lift = c(tier_2_lift, tier_2_lift), | |
reps = c(tier_2_reps, tier_2_reps / 2), | |
sets = c(1, 4) | |
) | |
tier_3 = data.frame( | |
tier = 3, | |
lift = tier_3_lift, | |
reps = tier_3_reps, | |
sets = tier_3_reps / 10 | |
) | |
if (type == "full") { | |
return(rbind(tier_1, tier_2, tier_3)) | |
} | |
if (type == "light") { | |
return(rbind(tier_2, tier_3)) | |
} | |
} | |
gen_workout() | |
gen_workout(type = "light") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment