addSessionToPlan: Add a session to a plan

Description Usage Arguments Examples

View source: R/helper.R

Description

Add a training session to a new or existing weekly plan

Usage

1
addSessionToPlan(weeklyPlan, session, day)

Arguments

weeklyPlan

(weekPlan) An object with the weekly training plan. If NULL, a new one will be created

session

(session) The new training session

day

(character) The day of the week where to add the training session

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#add a run threshold to settings
mySettings <- addThreshold(sport = 'run', metric = 'pace', value = '4:30')

# create run session
runSession <- createSession(sport = list('run'), metric = list('pace'),
minTargetZ = list(c(40, 20)), targetZ = list(c('4:50', '4:30')), TSS = list(NA),
userSettings =  mySettings,
description = 'making a run test session')

# create a new plan
newPlan <- storeSettings(mySettings)

# add session to the plan
newPlan <- addSessionToPlan(weeklyPlan = newPlan, session = runSession,
day = 'thursday')

theasjblog/tssPlanner_package documentation built on March 8, 2020, 2:36 a.m.