convertUnits: Wrapper for ud.convert that accepts vector inputs and...

Description Usage Arguments Details Value

View source: R/utils.R

Description

if udunits2 package is available, this is used. Otherwise my own functions.

Usage

1
2
convertUnits(x, from, to, inconvertibles = c("preserve", "omit"),
  use.ud = FALSE)

Arguments

x

Numeric vector of values

from

Units of x values

to

Units to convert to.

inconvertibles

Should units that cannot be converted be preserved or omitted from the result?

Details

If length(to) > 0, units the first is tried first, followed by the second, etc. If units in from are already contained in to, these units are not converted.

Value

A data.frame with columns x and units


markwh/rcmodel documentation built on May 21, 2019, 12:26 p.m.