gpxSmooth: gpxSmooth

Description Usage Arguments Details Value Examples

View source: R/smoothData.R

Description

Function to smooth variable. The function uses the function rollmean() from the package zoo to smooth the data. See its documentation for arguents and tier meaning

Usage

1
gpxSmooth(data, variable = NULL, k = 1)

Arguments

data

(dataframe) an activity dataframe

variable

(character) the column name of the variable to smooth. If NULL, all variable except 'Time', 'Distance', 'LatitudeDegrees' and 'LongitudeDegrees' will be smoothed

k

integer the size of the smooting kernel. Must be odd. An inner function converts even Ks to the closest odd K.

Details

The function uses the provided split values and split type to divide the activity dataframe in a list of dataframes, each one corresponding to a split starting and finishing at the specified times/distances.

Value

An activity dataframe with smoothed data

Examples

1
2
gpx <- evenActivity
smoothedData <- gpxSmooth(gpx, "Pace", k = 39)

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