createSession: createSession

Description Usage Arguments Details Examples

View source: R/createSession.R

Description

Function to set up a user swim threshold

Usage

1
2
3
4
5
6
7
8
9
createSession(
  sports,
  metrics = list(NA),
  minTargetZs = list(NA),
  targetZs = list(NA),
  TSS = list(NA),
  userSettings = NULL,
  description = ""
)

Arguments

sports

(list) One of the sports: bike, run, swim

metrics

(list) One of 'power', 'pace', 'HR'

minTargetZs

(list) Number of a minutes at a specified intensity for each sport/session

targetZs

(list) The session intensity for the minutes specified. Numeric for type = bike, character otherwise

TSS

(list) the known TSS for the session. If this is given (and is not NA (default)) it will be used to set the session TSS, even if intervals are given.

userSettings

(userSettings) an object of class userSettings

description

(character) Optional session description. If NULL, it will be set to the type

Details

Create a new training session

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##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('1:20', '1:40'), 250),
metric = list('pace', 'power'), userSettings = myThreshold, TSS = list(NA, NA),
description = 'making a test session')

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