Learn R Programming

aNCA (version 0.1.0)

get_conversion_factor: Transform Units

Description

This function transforms a value from an initial unit to a target unit.

Usage

get_conversion_factor(initial_unit, target_unit)

Value

A numeric value for the conversion factor from the initial to the target unit, or NA if the units are not convertible.

Arguments

initial_unit

A character string representing the initial unit.

target_unit

A character string representing the target unit.

Examples

Run this code
get_conversion_factor("meter", "kilometer")
get_conversion_factor("sec", "min")

Run the code above in your browser using DataLab