conv_dim {birk} | R Documentation |
DEPRECATED. Converts between dimensions of measurement given a transition dimension (the dimension that "bridges" x
and y
, e.g. liters per second, lbs per acre). Note that 2 of the 3 measurements (x
, y
, or trans
) must be defined to calculate the 3rd. See conv_unit_options
for all options.
conv_dim(x, x_unit, trans, trans_unit, y, y_unit)
x |
a numeric vector giving the measurement value in the first dimension. |
x_unit |
the unit in which |
trans |
a numeric vector giving the measurement value in the transition dimension. |
trans_unit |
the unit in which |
y |
a numeric vector giving the measurement value in the second dimension. |
y_unit |
the unit in which |
This function supports all dimensions in conv_unit_options
except for coordinates. The conversion values have been defined based primarily from international weight and measurement authorities (e.g. General Conference on Weights and Measures, International Committee for Weights and Measures, etc.). While much effort was made to make conversions as accurate as possible, you should check the accuracy of conversions to ensure that conversions are precise enough for your applications.
Years are defined as 365.25 days and months are defined as 1/12 a year.
cal is a thermochemical calorie (4.184 J) and Cal is 1000 cal (kcal or 4184 J).
All gallon-based units are US gallons.
All non-metric units are based on the avoirdupois system.
hp is mechanical horsepower, or 745.69 W.
mach is calculated at sea level at 15 °C.
Matthew A. Birk, matthewabirk@gmail.com
# How many minutes does it take to travel 100 meters at 3 feet per second?
conv_dim(x = 100, x_unit = "m", trans = 3, trans_unit = "ft_per_sec", y_unit = "min")
# How many degrees does the temperature increase with an increase in 4 kPa given 0.8 Celcius
# increase per psi?
conv_dim(x_unit = "C", trans = 0.8, trans_unit = "C_per_psi", y = 4, y_unit = "kPa")
# Find the densities given volume and mass measurements.
conv_dim(x = c(60, 80), x_unit = "ft3", trans_unit = "kg_per_l", y = c(6e6, 4e6), y_unit = "g")