Last chance! 50% off unlimited learning
Sale ends in
Apply geometrical transformations to a point pattern on a linear network.
# S3 method for lpp
affine(X, mat=diag(c(1,1)), vec=c(0,0), …) # S3 method for lpp
shift(X, vec=c(0,0), …, origin=NULL)
# S3 method for lpp
rotate(X, angle=pi/2, …, centre=NULL)
# S3 method for lpp
scalardilate(X, f, …)
# S3 method for lpp
rescale(X, s, unitname)
Point pattern on a linear network (object of class "lpp"
).
Matrix representing a linear transformation.
Vector of length 2 representing a translation.
Rotation angle in radians.
Scalar dilation factor.
Unit conversion factor: the new units are s
times the old units.
Arguments passed to other methods.
Character string determining a location
that will be shifted to the origin. Options are
"centroid"
, "midpoint"
and "bottomleft"
.
Partially matched.
Centre of rotation.
Either a vector of length 2, or a character string
(partially matched to "centroid"
, "midpoint"
or "bottomleft"
).
The default is the coordinate origin c(0,0)
.
Optional. New name for the unit of length.
A value acceptable to the function unitname<-
Another point pattern on a linear network (object of class
"lpp"
)
representing the
result of applying the geometrical transformation.
These functions are methods for the generic functions
affine
,
shift
,
rotate
,
rescale
and
scalardilate
applicable to objects of class "lpp"
.
All of these functions
perform geometrical transformations on the object X
,
except for rescale
, which simply rescales the units of length.
lpp
.
Generic functions
affine
,
shift
,
rotate
,
scalardilate
,
rescale
.
# NOT RUN {
X <- rpoislpp(2, simplenet)
U <- rotate(X, pi)
V <- shift(X, c(0.1, 0.2))
stretch <- diag(c(2,3))
Y <- affine(X, mat=stretch)
shear <- matrix(c(1,0,0.6,1),ncol=2, nrow=2)
Z <- affine(X, mat=shear, vec=c(0, 1))
# }
Run the code above in your browser using DataLab