Unit conversion | R Documentation |
This function takes a number in some specified units and converts that number to SI units,
or from SI units to the specified units.
Internally, all ctmm
objects are specified in SI units, and so this is a utility function to facilitate working with ctmm
objects.
x %#% y
x |
A numeric quantity specified in |
y |
A unit character label for the quantity |
If x
is a number and y
is a character unit label, then x
is converted from units y
to SI units. If x
is a character unit label and y
is a number, then y
is converted from SI units to units x
.
The default non-SI units include the mean solar 'day'
, mean synodic 'month'
and mean tropical 'year'
. These defaults can be changed to conventional calendar units via options(time.units='calendar')
.
Returns a numeric in SI units or units specified by character label x
.
C. H. Fleming.
unit
# one yard -> meters 1 %#% "yard" # one meter -> yards "yard" %#% 1 # 1 month -> days "day" %#% 1 %#% "month" # 6 miles per hour -> meters per second "hour" %#% 6 %#% "mile" # the same conversion in one step 6 %#% "mph"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.