generate_units | R Documentation |
Generate and set base units.
generate_units(variable, unit, sport, ...)
generateBaseUnits(variable, unit, sport, ...)
variable |
A vector of variables with user-specified units. |
unit |
A vector with the user-specified units, corresponding to variable (see details). |
sport |
A vector of sports (amongst |
... |
Currently not used. |
The available units are
variables latitude
and longitude
with unit
degree
(default)
variables altitude
, distance
with unit m
(default), km
, mi
or ft
variable heart_rate
with unit bpm
(default)
variable speed
with unit m_per_s
(default),
km_per_h
, ft_per_min
, ft_per_s
or
mi_per_h
variable cadence_running
with unit
steps_per_min
(default; running only)
variable cadence_cycling
with unit rev_per_min
(default; cycling only)
variable power
with unit W
(Watt; default) or
kW
(cycling only)
variable temperature
with unit C
(Celsius;
default) or F
Note that generate_units
checks if the supplied combinations
of variable
and sport
are valid.
generate_units
will not check if any of the supplied units
are correct for the corresponding combination of variable
and sport
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.