mUnits {BIOdry} | R Documentation |
Metric system
Description
This function control metric units.
Usage
mUnits(x, from = "mm", to = "mm")
Arguments
x |
|
from |
|
to |
|
Details
Characters in from
and to
arguments have the form 'p_', where 'p' is the
metric prefix and '_' is a base unit. Sixteen
metric prefixes are supported: atto 'a', femto
'f', pico 'p', nano 'n', micro 'mm', mili 'm',
centi 'c', deci 'd', deca 'da', hecto 'h', kilo
'k', mega 'M', giga 'G', tera 'T', peta 'P', and
exa 'E'.
Value
numeric
vector.
Author(s)
Wilson Lara <wilarhen@gmail.com>, Felipe Bravo <fbravo@pvs.uva.es>
Examples
## Simulation of TRW data
set.seed(1)
w <- abs(rnorm(12,1,1))
trw <- ts(w,start = 1970)
## transforming metric units of trw vector from milimeters to meters
sr <- mUnits(trw, from = 'mm', to = 'm')
attributes(sr)
[Package BIOdry version 0.9 Index]