methods.units
From spatstat v1.41-1
by Adrian Baddeley
Methods for Units
Methods for class "units"
.
Usage
## S3 method for class 'units':
print(x, ...)
## S3 method for class 'units':
summary(object, ...)
## S3 method for class 'units':
rescale(X, s, unitname)
## S3 method for class 'units':
compatible(A,B, ..., coerce=TRUE)
Arguments
- x,X,A,B,object
- Objects of class
"units"
representing units of length. - s
- Conversion factor: the new units are
s
times the old units. - ...
- Other arguments.
For
print.units
these arguments are passed toprint.default
. Forsummary.units
they are ignored. Forcompatible.units
these arguments are other objects of class"un
- coerce
- Logical. If
TRUE
, a null unit of length is compatible with any non-null unit. - unitname
- Optional new name for the unit. If present, this overrides the rescaling operation and simply substitutes the new name for the old one.
Details
These are methods for the generic functions
print
, summary
, rescale
and compatible
for the class "units"
.
An object of class "units"
represents a unit of length.
The print
method prints a description of the unit of length,
and the summary
method gives a more detailed description.
The rescale
method changes the unit of length by rescaling it.
The compatible
method tests whether two or more units of length
are compatible.
Value
- For
print.units
the value isNULL
. Forsummary.units
the value is an object of classsummary.units
(with its own print method). Forrescale.units
the value is another object of class"units"
. Forcompatible.units
the result is logical.
See Also
Community examples
Looks like there are no examples yet.