Dimensions and scale factors of quantities in a system
Source:R/physics-units-dimensions.R
set_quantity_dimension.RdThe _QuantityMapper methods shared by DimensionSystem() and
UnitSystem(). set_quantity_dimension() and
set_quantity_scale_factor() record a quantity's dimension and scale
factor in one system (prefixes and quantities inside the scale factor are
replaced by their scale factors at once); get_quantity_dimension() and
get_quantity_scale_factor() look them up, falling back to the global
definitions made with set_global_dimension() and
set_global_relative_scale_factor().
Usage
set_quantity_dimension(system, quantity, dimension)
set_quantity_scale_factor(system, quantity, scale_factor)
get_quantity_dimension(system, unit)
get_quantity_scale_factor(system, unit)Examples
u <- physics_units()
get_quantity_dimension(u$SI, u$newton)
#> Dimension(force, F)
get_quantity_scale_factor(u$SI, u$kilometer * u$gram)
#> 1000