Skip to contents

Convert distance (and area) values between different units

Usage

convert_dist_units(
  dist,
  from = NULL,
  to = "meter",
  drop = FALSE,
  digits = NULL
)

Arguments

dist

Numeric or units object

from

Existing unit for dist, Default: NULL. If dist is a units object, the numerator is used as "from"

to

Unit to convert distance to, Default: 'meter'

drop

If TRUE, return numeric. If FALSE, return class units object.

digits

Number of digits to include in result; defaults to NULL.

Value

Object created by units::set_units()