Description Usage Arguments Examples
Delete a training session from weekly plan
1 | deleteSession(weeklyPlan, day, sessionNumber)
|
weeklyPlan |
(weekPlan) An object with the weekly training plan. If NULL, a new one will be created |
day |
(character) The day of the week where to add the training session |
sessionNumber |
(numeric) the session id to delete |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ##set the run threshold to 4:30
myThreshold <- addThreshold(sport = 'run', metric = 'pace', value = '4:30')
##set the bike threshold to 250
myThreshold <- addThreshold(sport = 'bike', metric = 'power', value = 250, userSettings = myThreshold)
##create a brick session
newSession <- createSession(sports=list('run', 'bike'),
minTargetZ = list(c(20, 30), 60), targetZ = list(c('4:20', '4:40'), 250),
metric = list('pace', 'power'), userSettings = myThreshold, TSS = list(NA, NA),
description = 'making a test session')
# create a new plan
newPlan <- storeSettings(myThreshold)
##add to the plan monday
newPlan <- addSessionToPlan(weeklyPlan = newPlan, session = newSession, day = 'monday')
##add to the plan sunday
newPlan <- addSessionToPlan(weeklyPlan = newPlan, session = newSession, day = 'sunday')
cat(summary(newPlan))
##delete the session
newPlan <- deleteSession(weeklyPlan = newPlan, day = 'monday', sessionNumber = 1)
cat(summary(newPlan))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.