run_workout: Run full workout

Description Usage Arguments Value Examples

View source: R/run_workout.R

Description

Input data frame of randomly generated workout from generate_workout() function and run the series of warm-ups and workouts at intervals defined by the user (specify the length of each interval in seconds). In between each exercise, there are 10 seconds transition time built in.

Usage

1
run_workout(workout_df, warmup_seconds, workout_seconds)

Arguments

workout_df

Data frame with list of workouts randomly generated from the generate_workout() function.

warmup_seconds

Length of warm-up exercises in seconds, 60 = 60 seconds.

workout_seconds

Length of regular workout exercises in seconds, 60 = 60 seconds.

Value

After executing this command, the console will turn into a countdown timer to run your workout. Sounds will play to indicate each transition. There will first be a 3 second prompt to get ready for the warm-up. Then the number of warm-ups from your workout will run one after another (with 10 second transitions). After the warm-up exercises conclude, there will be a 3 second transition before the main work out exercises begin. Work out exercises will run in the order provided from the input data frame and will run at an interval length defined by the user (in seconds).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# First run the generate_workout() command to make your workout
myworkout <- generate_workout(4, 8)
# Output will include 4 warm-ups and
## 8 workouts saved as a dataframe called "myworkout"

run_workout(myworkout, 45, 60)
# This will run 4 warm-up exercises for
## 45 seconds each and then run 8 main
## workout exercises for 60 seconds.
## The console will become a countdown timer.

shu251/exRcise documentation built on March 6, 2021, 12:29 a.m.