convert_area: Convert between area units-miles2, ft2, inch2, cm2, m2, km2

Description Usage Arguments Value Examples

View source: R/convert_area.R

Description

Convert between area units–miles2, ft2, inch2, cm2, m2, km2

Usage

1
convert_area(x, from, to)

Arguments

x

A vector of numbers to be converted.

from

A character vector of the units x is in. Must be length 1 or same length as x.

to

A character vector of the units into which x will be converted. Must be length 1 or same length as x.

Value

A vector of numbers converted FROM old units TO new units.

Examples

1
2
3
convert_area(1, "ft2", "inch2")
convert_area(c(1, 10, 100), "ft2", "inch2")
convert_area(c(1, 1, 1), c("ft2", "inch2", "cm2"), c("inch2", "cm2", "ft2"))

mattreusswig/convertUnits documentation built on March 23, 2020, 5:26 a.m.