rescale {spatstat} | R Documentation |
Converts between different units of length in a spatial dataset, such as a point pattern or a window.
rescale(X, s)
X |
Any suitable dataset representing a two-dimensional
object, such as a point pattern (object of class |
s |
Conversion factor: the new units are |
This is generic. Methods are provided for
point patterns (rescale.ppp
)
and windows (rescale.owin
).
The spatial coordinates in the dataset X
will be re-expressed
in terms of a new unit of length that is s
times the current
unit of length given in X
.
For example if X
is a dataset giving coordinates in metres,
then rescale(X,1000)
will divide the coordinate values by 1000 to obtain coordinates in
kilometres, and the unit name will be changed from "metres"
to "1000 metres"
.
Another object of the same type, representing the same data, but expressed in the new units.
The result of this operation is equivalent to the original dataset.
If you want to actually change the coordinates by
a linear transformation, producing a dataset that is not equivalent
to the original one, use affine
.
Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
unitname
,
rescale.ppp
,
rescale.owin
,
affine
,
rotate
,
shift