methods.unitname {spatstat.geom} | R Documentation |
Methods for Units
Description
Methods for class "unitname"
.
Usage
## S3 method for class 'unitname'
print(x, ...)
## S3 method for class 'unitname'
summary(object, ...)
## S3 method for class 'unitname'
rescale(X, s, unitname)
## S3 method for class 'unitname'
compatible(A,B, ..., coerce=TRUE)
## S3 method for class 'unitname'
harmonise(..., coerce=TRUE, single=FALSE)
## S3 method for class 'unitname'
harmonize(..., coerce=TRUE, single=FALSE)
Arguments
x , X , A , B , object |
Objects of class |
... |
Other arguments.
For |
s |
Conversion factor: the new units are |
unitname |
Optional new name for the unit. If present, this overrides the rescaling operation and simply substitutes the new name for the old one. |
coerce |
Logical. If |
single |
Logical value indicating whether to return a single unitname, or a list of unitnames. |
Details
These are methods for the generic functions
print
, summary
, rescale
and compatible
for the class "unitname"
.
An object of class "unitname"
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.
The harmonise
method returns the common unit of length
if there is one. For consistency with other methods for
harmonise
, the result is a list of unitname objects,
with one entry for each argument in ...
. All of these
entries are identical. This can be overridden by setting
single=TRUE
when the result will be a single unitname object.
Value
For print.unitname
the value is NULL
.
For summary.unitname
the value is an object of class
summary.unitname
(with its own print method).
For rescale.unitname
the value is another object of class "unitname"
.
For compatible.unitname
the result is logical.
For harmonise.unitname
the result is a list of
identical unitnames if single=FALSE
(the default),
or a single unitname if single=TRUE
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.