convert_units {sportyR}R Documentation

Convert all units, regardless of starting and ending units

Description

Convert all units, regardless of starting and ending units

Usage

convert_units(meas, from_unit, to_unit, conversion_columns = NULL)

Arguments

meas

A measurement in any unit of length

from_unit

A string containing the original unit of measure to be converted

to_unit

A string containing the ending unit of measure

conversion_columns

A vector containing the columns to convert if meas is of type data.frame

Value

The measurement in converted units

Examples

convert_units(1, "in", "cm")
convert_units(100, "cm", "m")

[Package sportyR version 2.2.2 Index]