groupGeneric.quantities {quantities} | R Documentation |
S3 Group Generic Functions
Description
Math
, Ops
and Summary
group generic methods for
quantities
objects (see groupGeneric
for a
comprehensive list of available methods).
Usage
## S3 method for class 'quantities'
Math(x, ...)
## S3 method for class 'quantities'
Ops(e1, e2)
## S3 method for class 'quantities'
Summary(..., na.rm = FALSE)
Arguments
x , e1 , e2 |
objects. |
... |
further arguments passed to methods. |
na.rm |
logical: should missing values be removed? |
Details
See groupGeneric.errors
,
Ops.units
, Math.units
, for further details.
Examples
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)
[Package quantities version 0.2.2 Index]