zone_time {cycleRtools} | R Documentation |
Given a vector of zone boundaries, sums the time spent in each zone.
zone_time(data, column = "power.W", zbounds, pct = FALSE, character.only = FALSE)
data |
a "cycleRdata" object, produced from a |
column |
the column name of the data to which the zone boundaries relate. |
zbounds |
numeric; zone boundaries. |
pct |
should percentage values be returned? |
character.only |
are column name arguments given as character strings? A backdoor around non-standard evaluation. Mainly for internal use. |
a data frame of zone times.
data(ridedata) ## Time spent above and below critical power... zone_time(ridedata, "power.W", zbounds = 300) / 60 # Minutes. ## Or with more zones... zone_time(ridedata, "power.W", zbounds = c(100, 200, 300)) / 60 ## Or given as a percentage... zone_time(ridedata, "power.W", zbounds = c(100, 200, 300), pct = TRUE)