Learn R Programming

activatr (version 0.2.1)

speed_to_mile_pace: Convert speed to mile pace

Description

speed_to_mile_pace converts a speed (in meters per second) to a mile pace. This method is vectorized, so it works on a column in a data frame. This is most useful after calling mutate_with_speed(), to convert that speed to the more-commonly-used pace. See vignette("pace") for examples.

Usage

speed_to_mile_pace(speed)

Value

A corresponding vector of lubridate::duration values, representing the mile pace.

Arguments

speed

A vector of doubles representing speed in meters per second, as from mutate_with_speed().

Examples

Run this code
speed_to_mile_pace(3)
speed_to_mile_pace(1)

Run the code above in your browser using DataLab