addSeparator: addSeparator

Description Usage Arguments Details Value Examples

View source: R/addSeparator.R

Description

Function to assist in identifying the split values to manually generate splits.

Usage

1
addSeparator(data, splitHere, xVariable = "Time", yVariable = "Distance")

Arguments

data

an activity dataframe

splitHere

(numeric) vector for where to split

xVariable

(numeric) the variable (column name) to put on the x axis

yVariable

(numeric) the variable (column name) to put on the y axis

Details

The function accepts a data frame created with dataLoader(). The function does not return a list of splits. It is intended to be used as a tool to identify the best positions for the splits, which can be generated later on using createSplits(). The function uses a plot to help with the task. By visualising appropriate metrics combiantions (i.e. 'Time' vs 'Pace') it is possible to exactly identify when a split starts/finishes. The values can then be used to generate splits using the function createSplits()

Value

A ggplot plot

Examples

1
2
3
4
gpx <- intervalActivity
proposedSplits <- c(9, 13, 15, 19, 21.2, 25.1, 27.3, 31.4, 33.4, 37.5, 39.5)
addSeparator(gpx, proposedSplits)
sp <- createSplits(gpx, proposedSplits, "thisMin")

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