Learn R Programming

cycleRtools (version 1.0.0)

zone_index: Index zones.

Description

Generate a vector of zone "levels" from an input vector and defined boundaries.

Usage

zone_index(x, zbounds)

Arguments

x
numeric; values to be "zoned".
zbounds
numeric; values for zone boundaries.

Value

  • a numeric vector of zone values of the same length as x. The number of zone levels will be length(zbounds) + 1.

Examples

Run this code
data(cycling_data)
cycling_data$zone <- zone_index(cycling_data$power.W, c(100, 200, 300))

Run the code above in your browser using DataLab