From 701226ca02b0ef5c8b1cdd85f06d21fade3356be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Sun, 8 Nov 2020 00:49:10 +0100 Subject: [PATCH] add some notes about #253 --- R/arith.R | 12 +++++++++++- man/Ops.units.Rd | 13 ++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/R/arith.R b/R/arith.R index d3614998..a412e0e6 100644 --- a/R/arith.R +++ b/R/arith.R @@ -5,7 +5,17 @@ #' S3 Ops Group Generic Functions for units objects #' -#' Ops functions for units objects, including comparison, product and divide, add, subtract +#' Ops functions for units objects, including comparison, product and divide, +#' add, subtract. +#' +#' Users are advised against performing arithmetical operations with +#' temperatures in different units. The \pkg{units} package ensure that results +#' 1) are arithmetically correct, and 2) satisfy dimensional analysis, but could +#' never ensure that results are physically meaningful. Temperature units are +#' special because there is an absolute unit, Kelvin, and relative ones, Celsius +#' and Fahrenheit degrees. Arithmetic operations between them are meaningless +#' from the physical standpoint. Users are thus advised to convert all +#' temperatures to Kelvin before operating. #' #' @param e1 object of class \code{units}, #' or something that can be coerced to it by \code{as_units(e1)} diff --git a/man/Ops.units.Rd b/man/Ops.units.Rd index 593b1fd4..31874571 100644 --- a/man/Ops.units.Rd +++ b/man/Ops.units.Rd @@ -18,7 +18,18 @@ or in case of power a number (integer n or 1/n)} object of class \code{units} } \description{ -Ops functions for units objects, including comparison, product and divide, add, subtract +Ops functions for units objects, including comparison, product and divide, +add, subtract. +} +\details{ +Users are advised against performing arithmetical operations with +temperatures in different units. The \pkg{units} package ensure that results +1) are arithmetically correct, and 2) satisfy dimensional analysis, but could +never ensure that results are physically meaningful. Temperature units are +special because there is an absolute unit, Kelvin, and relative ones, Celsius +and Fahrenheit degrees. Arithmetic operations between them are meaningless +from the physical standpoint. Users are thus advised to convert all +temperatures to Kelvin before operating. } \examples{ a <- set_units(1:3, m/s)