groupGeneric.quantities | R Documentation |
Math
, Ops
and Summary
group generic methods for
quantities
objects (see groupGeneric
for a
comprehensive list of available methods).
## S3 method for class 'quantities'
Math(x, ...)
## S3 method for class 'quantities'
Ops(e1, e2)
## S3 method for class 'quantities'
Summary(..., na.rm = FALSE)
x , e1 , e2 |
objects. |
... |
further arguments passed to methods. |
na.rm |
logical: should missing values be removed? |
See groupGeneric.errors
,
Ops.units
, Math.units
, for further details.
x <- set_quantities(1:3, m/s, 0.1)
log(x)
cumsum(x)
cumprod(x)
a <- set_quantities(1:3, m/s, 0.1)
b <- set_quantities(1:3, m/s, 0.1)
a + b
a * b
a / b
a = set_quantities(1:5, m, 0.1)
a %/% a
a %/% set_quantities(2)
set_quantities(1:5, m^2, 0.1) %/% set_quantities(2, m, 0.1)
a %% a
a %% set_quantities(2)
c(min(x), max(x))
range(x)
sum(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.