plotCompareSplit: plotCompareSplits

Description Usage Arguments Details Value Examples

View source: R/plotCompareSplits.R

Description

Function to plot activity metrics comparison between splits

Usage

1
2
3
4
5
6
7
8
9
plotCompareSplit(
  data,
  doFacet = TRUE,
  type = c("raw", "norm", "perc")[1],
  xVariable = "Time",
  showMe = NULL,
  ftp = NULL,
  ftpType = c("power", "pace", "HR")[1]
)

Arguments

data

(list) the list of dataframes for the activity splits

doFacet

(logical) TRUE to plot variables separetly, FALSE to plot them overlayed

type

(character) One of "raw", "norm" or "perc" to plot differently normalised valued.

  • 'raw' is the raw data

  • 'norm' is the data normalised in the rage 0 to 100

  • 'perc' is the variation in percentage from the mean value of all the intervals

If using 'raw' or 'perc' it is suggested to set doFacet = TRUE

xVariable

(character) the variable to put on the x axis. One of 'DistanceMeters' or 'Time'

showMe

(character) The metrics to include in the plot. Must be the same name as the column in the dataframe.

ftp

(numeric) Functional threshold power if bike workout, pace [min/km] if run, functional threshold if using HR

ftpType

(character) One os 'power', 'pace' or 'HR', to describe what kind of FTP was provided

Details

The function plots the variation of every metric over interval index, It is useful to see if all interval were performed at the desired target intensity

Value

A ggplot object

Examples

1
2
3
4
5
6
gpx <- intervalActivity
sp <- autoSplits(gpx)
plotCompareSplit(sp, doFacet=TRUE, type = "raw")
plotCompareSplit(sp, doFacet=TRUE, type = "norm")
plotCompareSplit(sp, doFacet=FALSE, type = "norm")
plotCompareSplit(sp, doFacet=TRUE, type = "perc")

theasjblog/tcx_package documentation built on March 13, 2021, 2:24 a.m.