mmp_act: Returns the mean maximum power for a given activity.

Description Usage Arguments Value Author(s) Examples

View source: R/mmp_act.R

Description

Returns the moving maximum power for a given activity, using the power data second-by-second, from all durations to the length of the training session.

Usage

1
mmp_act(activity)

Arguments

activity

A vector containing the second-by-second power data in watts, from an activity.

Value

The output of this function is a vector of all mean maximum power, from all durations.

Author(s)

Natan Freitas Leite.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## The function is currently defined as
mmp_act=function(activity){
  require(zoo)
  mmp_vec=c()
  l_act=length(activity)

  for (i in 1:l_act){
    mmp_vec[i]=max(rollmean(activity,i))

  }

  return(mmp_vec)

}

data(power_list)

mmp=mmp_act(power_list[[1]])
plot(mmp)

Bolshom/optimumtt documentation built on May 24, 2019, 8:56 a.m.